44 #include "ConstrainedOptPack_ComputeMinMult.hpp"
45 #include "AbstractLinAlgPack_SpVectorClass.hpp"
46 #include "DenseLinAlgPack_DVectorClass.hpp"
51 T my_min(
const T& v1,
const T& v2 ) {
return v1 < v2 ? v1 : v2; }
54 ConstrainedOptPack::value_type
55 ConstrainedOptPack ::min_abs(
const DVectorSlice& mu )
59 value_type min = std::fabs(mu(1));
60 for( DVectorSlice::const_iterator itr = mu.begin() + 1; itr != mu.end(); )
61 min = my_min( min, std::fabs(*itr++) );
65 ConstrainedOptPack::value_type
66 ConstrainedOptPack ::min_abs(
const SpVectorSlice& mu )
72 value_type min = std::fabs(mu.begin()->value());
73 for( SpVectorSlice::const_iterator itr = mu.begin() + 1; itr != mu.end(); ++itr )
74 min = my_min( min, std::fabs(itr->value()) );