Defines | |
| #define | STATE_IQ_DECL(TYPE, NAME) |
| Add class declarations for an arbitrary iteration quantity. | |
| #define | STATE_INDEX_IQ_DECL(NAME) STATE_IQ_DECL(index_type,NAME) \ |
| Add class declarations for an index (i.e. index_type) iteration quantity. | |
| #define | STATE_SCALAR_IQ_DECL(NAME) STATE_IQ_DECL(value_type,NAME) \ |
| Add class declarations for a scalar (i.e. value_type) iteration quantity. | |
| #define | STATE_VECTOR_IQ_DECL(NAME) STATE_IQ_DECL(VectorMutable,NAME) \ |
| Add class declarations for a VectorMutable iteration quantity. | |
| #define | STATE_IQ_DEF(CLASS, TYPE, NAME, NAME_STR) |
| Add class definitions for an arbitrary iteration quantity. | |
| #define | STATE_INDEX_IQ_DEF(CLASS, NAME, NAME_STR) |
| Add class definitions for a index_type iteration quantity. | |
| #define | STATE_SCALAR_IQ_DEF(CLASS, NAME, NAME_STR) |
| Add class definitions for a value_type iteration quantity. | |
| #define | STATE_VECTOR_IQ_DEF(CLASS, NAME, NAME_STR, VEC_SPC, VEC_RN) |
| Add class definitions for a VectorMutable iteration quantity. | |
IterationPack::AlgorithmState subclass) to add iteration quantities. Since scalars and vectors are so pervasive they have there own special macros that take care of actually instantiating the iteration quantities. | #define STATE_IQ_DECL | ( | TYPE, | |||
| NAME | ) |
Value:
virtual IterQuantityAccess<TYPE>& NAME(); \ virtual const IterQuantityAccess<TYPE>& NAME() const; \ private: \ iq_id_encap NAME ## _iq_id_; \ public:
Definition at line 113 of file MoochoPack_NLPAlgoState.hpp.
| #define STATE_INDEX_IQ_DECL | ( | NAME | ) | STATE_IQ_DECL(index_type,NAME) \ |
Add class declarations for an index (i.e. index_type) iteration quantity.
Definition at line 122 of file MoochoPack_NLPAlgoState.hpp.
| #define STATE_SCALAR_IQ_DECL | ( | NAME | ) | STATE_IQ_DECL(value_type,NAME) \ |
Add class declarations for a scalar (i.e. value_type) iteration quantity.
Definition at line 127 of file MoochoPack_NLPAlgoState.hpp.
| #define STATE_VECTOR_IQ_DECL | ( | NAME | ) | STATE_IQ_DECL(VectorMutable,NAME) \ |
Add class declarations for a VectorMutable iteration quantity.
Definition at line 132 of file MoochoPack_NLPAlgoState.hpp.
| #define STATE_IQ_DEF | ( | CLASS, | |||
| TYPE, | |||||
| NAME, | |||||
| NAME_STR | ) |
Value:
IterQuantityAccess<TYPE>& \
CLASS::NAME() \
{ \
update_iq_id( NAME_STR, &NAME ## _iq_id_ ); \
return IterationPack::cast_iq<TYPE>( \
*this, NAME ## _iq_id_.iq_id, NAME_STR ); \
} \
const IterQuantityAccess<TYPE>& \
CLASS::NAME() const \
{ \
return const_cast<CLASS*>(this)->NAME(); \
}
This implementation can not instantate the underlying iteration quantity so it is the responsibility of some client to do this. This implementation just initializes the iq_id for the iteration quantity on the fly and then casts the iteration quantity.
Definition at line 142 of file MoochoPack_NLPAlgoState.hpp.
| #define STATE_INDEX_IQ_DEF | ( | CLASS, | |||
| NAME, | |||||
| NAME_STR | ) |
Value:
IterQuantityAccess<index_type>& \
CLASS::NAME() \
{ \
update_index_type_iq_id( NAME_STR, &NAME ## _iq_id_ ); \
return IterationPack::cast_iq<index_type>( \
*this, NAME ## _iq_id_.iq_id, NAME_STR ); \
} \
const IterQuantityAccess<index_type>& \
CLASS::NAME() const \
{ \
return const_cast<CLASS*>(this)->NAME(); \
}
This implementation will instantiate the IterQuantity object on the fly.
Definition at line 160 of file MoochoPack_NLPAlgoState.hpp.
| #define STATE_SCALAR_IQ_DEF | ( | CLASS, | |||
| NAME, | |||||
| NAME_STR | ) |
Value:
IterQuantityAccess<value_type>& \
CLASS::NAME() \
{ \
update_value_type_iq_id( NAME_STR, &NAME ## _iq_id_ ); \
return IterationPack::cast_iq<value_type>( \
*this, NAME ## _iq_id_.iq_id, NAME_STR ); \
} \
const IterQuantityAccess<value_type>& \
CLASS::NAME() const \
{ \
return const_cast<CLASS*>(this)->NAME(); \
}
This implementation will instantiate the IterQuantity object on the fly.
Definition at line 178 of file MoochoPack_NLPAlgoState.hpp.
| #define STATE_VECTOR_IQ_DEF | ( | CLASS, | |||
| NAME, | |||||
| NAME_STR, | |||||
| VEC_SPC, | |||||
| VEC_RN | ) |
Value:
IterQuantityAccess<VectorMutable>& \
CLASS::NAME() \
{ \
update_vector_iq_id( NAME_STR, VEC_SPC, VEC_RN, &NAME ## _iq_id_ ); \
return IterationPack::cast_iq<VectorMutable>( \
*this, NAME ## _iq_id_.iq_id, NAME_STR ); \
} \
const IterQuantityAccess<VectorMutable>& \
CLASS::NAME() const \
{ \
return const_cast<CLASS*>(this)->NAME(); \
}
This implementation will instantiate the IterQuantity object on the fly given the VectorSpace (VEC_SPC). Note that this VEC_SPC can be any code that will returns a smart pointer to a AbstractFactory<VectorMutable> object from within the class body. It is best if VEC_SPC is some function that is called on *this for the maximum safety and to avoid strage behavior.
Definition at line 201 of file MoochoPack_NLPAlgoState.hpp.
1.4.7