37 _type(), _parameters()
54 else if (c.
_type < _type)
99 for (
size_t i=0; i<parameterIndices.size(); i++){
100 if (parameterIndices[i]<0 || parameterIndices[i] >=(
int)
_parameters.size())
125 iterator it=find(key);
136 cerr <<
"fatal error in creating cache of type " << key.
type() << endl;
142 cerr <<
"fatal error in creating cache of type " << key.
type() << endl;
148 insert(make_pair(key,c));
161 return _vertex->graph();
166 for (iterator it=begin(); it!=end(); it++){
174 for (iterator it=begin(); it!=end(); ++it){
180 for (iterator it=begin(); it!=end(); ++it){
ParameterVector _parameters
#define __PRETTY_FUNCTION__
static Factory * instance()
return the instance
virtual bool resolveDependancies()
Cache(CacheContainer *container_=0, const ParameterVector ¶meters_=ParameterVector())
OptimizableGraph * graph()
CacheContainer * _container
HyperGraph::HyperGraphElement * construct(const std::string &tag) const
OptimizableGraph::Vertex * vertex()
virtual void updateImpl()=0
redefine this to do the update
virtual ~CacheContainer()
void setUpdateNeeded(bool needUpdate=true)
Cache * findCache(const Cache::CacheKey &key)
const std::string & tag(const HyperGraph::HyperGraphElement *v) const
return the TAG given a vertex
ParameterVector & parameters()
ParameterVector _parameters
Cache * installDependency(const std::string &type_, const std::vector< int > ¶meterIndices)
bool operator<(const CacheKey &c) const
std::vector< Parameter * > ParameterVector
create vertices and edges based on TAGs in, for example, a file
OptimizableGraph * graph()
A general case Vertex for optimization.
CacheContainer * container()
const std::string & type() const
OptimizableGraph::Vertex * vertex()
CacheContainer(OptimizableGraph::Vertex *vertex_)
Cache * createCache(const Cache::CacheKey &key)
std::vector< Cache * > _parentCaches