1#ifndef CYCLUS_SRC_GREEDY_PRECONDITIONER_H_ 
    2#define CYCLUS_SRC_GREEDY_PRECONDITIONER_H_ 
   13                  std::map<std::string, double>* weights,
 
   18                   std::map<std::string, double>* weights,
 
   19                   std::map<ExchangeNode::Ptr, double>* avg_prefs);
 
   88    return NodeWeight(l, &commod_weights_, avg_prefs_[l]) >
 
   89           NodeWeight(r, &commod_weights_, avg_prefs_[r]);
 
 
   95    return group_weights_[l] > group_weights_[r];
 
 
  101  void ProcessWeights_(
WgtOrder order);
 
  103  bool apply_commod_weights_;
 
  104  std::map<ExchangeNode::Ptr, double> avg_prefs_;
 
  105  std::map<std::string, double> commod_weights_;
 
  106  std::map<RequestGroup::Ptr, double> group_weights_;
 
 
An ExchangeGraph is a resource-neutral representation of a ResourceExchange.
 
void Condition(ExchangeGraph *graph)
conditions the graph as described above
 
GreedyPreconditioner()
constructor if weights are given in heaviest-first order
 
WgtOrder
the order of commodity weights
 
@ END
a flag for commodity weights given in the reverse order, i.e, lightest first
 
bool NodeComp(const ExchangeNode::Ptr l, const ExchangeNode::Ptr r)
a comparitor for ordering containers of ExchangeNode::Ptrs in descending order based on their commodi...
 
bool GroupComp(const RequestGroup::Ptr l, const RequestGroup::Ptr r)
a comparitor for ordering containers of Request::Ptrs in descending order based on their average comm...
 
boost::shared_ptr< RequestGroup > Ptr
 
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
 
double AvgPref(ExchangeNode::Ptr n)
 
double NodeWeight(ExchangeNode::Ptr n, std::map< std::string, double > *weights, double avg_pref)
 
double GroupWeight(RequestGroup::Ptr g, std::map< std::string, double > *weights, std::map< ExchangeNode::Ptr, double > *avg_prefs)
 
boost::shared_ptr< ExchangeNode > Ptr