36 #include "ObjectiveFunction.hpp"
37 #include "CompositeOFAdd.hpp"
38 #include "MsqTimer.hpp"
39 #include "PatchData.hpp"
55 ObjectiveFunction* Obj2){
56 if(Obj1->get_quality_metric()==Obj2->get_quality_metric()){
80 temp_list.merge(temp_list2);
97 double second_val=0.0;
132 double second_val=0.0;
138 int num_vert=patch.num_vertices();
148 for(i=0;i<num_vert;++
i){
149 grad[
i]+=second_grad[
i];
152 delete []second_grad;
void set_gradient_type(GRADIENT_TYPE grad)
Set gradType to either NUMERICAL_GRADIENT or ANALYTICAL_GRADIENT.
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
void set_quality_metric(QualityMetric *qm)
Set the value of qMetric.
ObjectiveFunction * objFunc1
bool evaluate(PatchData &patch, double &fval, MsqError &err)
every differentiable function should have an analytical gradient implemented.
CompositeOFAdd(ObjectiveFunction *, ObjectiveFunction *)
virtual msq_std::list< QualityMetric * > get_quality_metric_list()
NVec< 3, double > Vector3D
#define MSQ_CHKERR(err)
Mesquite's Error Checking macro.
bool compute_gradient(PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size=0)
Calls either compute_numerical_gradient or compute_analytical_gradient depending on the value of grad...
virtual ~CompositeOFAdd()
bool compute_analytical_gradient(PatchData &patch, Vector3D *const &grad, double &OF_val, MsqError &err, size_t array_size)
void set_negate_flag(int neg)
Set the value of ObjectiveFunction's negateFlag. Unless composite, concrete ObjectiveFunctions should...
ObjectiveFunction * objFunc2
#define MSQ_FUNCTION_TIMER(NAME)
virtual bool concrete_evaluate(PatchData &patch, double &fval, MsqError &err)
virtual msq_std::list< QualityMetric * > get_quality_metric_list()