76 *targ_obj = malloc( mem_size );
77 return vtbl->
obj_reinit(vtbl,obj_data,*targ_obj);
93 ,
const void * obj_data
105 assert( reduct_obj );
106 assert( num_values == 2 );
107 assert( num_indexes == 0 );
108 assert( num_chars == 0 );
109 assert( value_data );
119 ,
const void* obj_data
131 assert( *reduct_obj );
132 assert( num_values == 2 );
133 assert( num_indexes == 0 );
134 assert( num_chars == 0 );
135 assert( value_data );
182 if( num_targ_vecs != 0 )
184 if( vecs[0].global_offset != vecs[1].global_offset
185 || vecs[0].sub_dim != vecs[1].sub_dim
186 || vecs[0].global_offset != vecs[2].global_offset
187 || vecs[0].sub_dim != vecs[2].sub_dim
188 || vecs[0].global_offset != vecs[3].global_offset
189 || vecs[0].sub_dim != vecs[3].sub_dim
227 for( k = 0; k < sub_dim; ++k, xl_val += xl_val_s, x_val += x_val_s, d_val += d_val_s, xu_val += xu_val_s ) {
228 if( *x_val < *xl_val - beta || *x_val > *xu_val + beta ) {
232 if( *d_val != 0.0 ) {
234 alpha = (*xl_val - beta - *x_val) / *d_val;
235 if( ( alpha > 0.0 && alpha < targ->
alpha_pos )
236 || ( alpha == 0.0 && *d_val < 0.0 ) )
238 if( ( alpha < 0.0 && -alpha < -targ->
alpha_neg )
239 || ( alpha == 0.0 && *d_val > 0.0 ) )
242 alpha = (*xu_val + beta - *x_val) / *d_val;
243 if( (alpha > 0.0 && alpha < targ->alpha_pos )
244 || ( alpha == 0.0 && *d_val > 0.0 ) )
246 if( ( alpha < 0.0 && -alpha < -targ->alpha_neg )
247 || ( alpha == 0.0 && *d_val < 0.0 ) )
280 ,
"ROp_max_near_feas_step"
const struct RTOp_RTOp_vtbl_t RTOp_ROp_max_near_feas_step_vtbl
int(* obj_create)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
const struct RTOp_obj_type_vtbl_t * obj_data_vtbl
struct RTOp_ROp_max_near_feas_step_reduct_obj_t RTOp_ROp_max_near_feas_step_val(RTOp_ReductTarget targ_obj)
#define RTOp_ERR_INCOMPATIBLE_VECS
RTOp_value_type alpha_neg
const RTOp_value_type * values
static int targ_load_state(const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, int num_values, const RTOp_value_type value_data[], int num_indexes, const RTOp_index_type index_data[], int num_chars, const RTOp_char_type char_data[], void **reduct_obj)
int RTOp_ROp_max_near_feas_step_set_beta(RTOp_value_type beta, struct RTOp_RTOp *op)
static int get_reduct_op(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, RTOp_reduct_op_func_ptr_t *reduct_op_func_ptr)
#define RTOp_ERR_INVALID_NUM_VECS
int(* obj_free)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
static int targ_obj_reinit(const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget targ_obj)
static int reduce_reduct_objs(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget in_reduct_obj, RTOp_ReductTarget inout_reduct_obj)
static int get_targ_type_num_entries(const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, int *num_values, int *num_indexes, int *num_chars)
INSERT_GET_REDUCT_OP_FUNCS(2, 0, 0, RTOp_ROp_max_near_feas_step_reduct_obj_t, reduce_reduct_objs, targ_load_state, targ_extract_state, external_reduct_op, get_reduct_op) const
static const struct RTOp_obj_type_vtbl_t targ_obj_vtbl
static int targ_obj_create(const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget *targ_obj)
static int RTOp_ROp_max_near_feas_step_apply_op(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, const int num_vecs, const struct RTOp_SubVector vecs[], const int num_targ_vecs, const struct RTOp_MutableSubVector targ_vecs[], RTOp_ReductTarget targ_obj)
static int targ_extract_state(const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, void *reduct_obj, int num_values, RTOp_value_type value_data[], int num_indexes, RTOp_index_type index_data[], int num_chars, RTOp_char_type char_data[])
int(* obj_reinit)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj)
int RTOp_ROp_max_near_feas_step_construct(RTOp_value_type beta, struct RTOp_RTOp *op)
const struct RTOp_RTOp_vtbl_t * vtbl
int RTOp_obj_free_free(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
int RTOp_ROp_max_near_feas_step_destroy(struct RTOp_RTOp *op)
RTOp_value_type alpha_pos
#define RTOp_ERR_INVALID_NUM_TARG_VECS
const struct RTOp_obj_type_vtbl_t RTOp_obj_value_vtbl
static void CALL_API external_reduct_op(void *in_targ_array, void *inout_targ_array, int *len, RTOp_Datatype *datatype)
Teuchos_Ordinal RTOp_index_type