#ifndef MixedEnergy_H #define MixedEnergy_H /* Last edited on DATE TIME by USER */ #include typedef struct MixedEnergy_data_t { Energy_vec_t term; /* Energy ingredients */ double_vec_t weight; /* Weight of each ingredient */ double_vec_t termValue; /* Value of each term as of last {eval}, or empty vec */ } MixedEnergy_data_t; /* A {MixedEnergy.T} is a linear combinations of the energy functions {term[k]}, with weights {weight[k]}. The {eval} method will leave the (unweighted) energy terms in {termValue}. Energy_t MixedEnergy_new(Energy_vec_t *term, double_vec_t *weight); /* Allocates new arrays for {term}, {weight}, and {termValue}, and copies the given arrays into them. Assumes the {term[k]} has been initialized. */ #endif