78 for (std::vector<Cache*>::iterator it =
_parentCaches.begin();
87 const std::vector<int>& parameterIndices) {
89 for (
size_t i = 0; i < parameterIndices.size(); i++) {
90 if (parameterIndices[i] < 0 ||
113 iterator it = find(key);
114 if (it == end())
return nullptr;
123 G2O_ERROR(
"fatal error in creating cache of type {}", key.
type());
129 G2O_ERROR(
"fatal error in creating cache of type {}, wrong type",
136 insert(make_pair(key, c));
151 for (iterator it = begin(); it != end(); ++it) {
159 for (iterator it = begin(); it != end(); ++it) {
165 for (iterator it = begin(); it != end(); ++it) {
Cache * createCache(const Cache::CacheKey &key)
void setUpdateNeeded(bool needUpdate=true)
Cache * findCache(const Cache::CacheKey &key)
virtual ~CacheContainer()
OptimizableGraph * graph()
OptimizableGraph::Vertex * _vertex
OptimizableGraph::Vertex * vertex()
CacheContainer(OptimizableGraph::Vertex *vertex_)
bool operator<(const CacheKey &c) const
ParameterVector _parameters
const std::string & type() const
CacheContainer * _container
std::vector< Cache * > _parentCaches
ParameterVector & parameters()
OptimizableGraph * graph()
CacheContainer * container()
Cache * installDependency(const std::string &type_, const std::vector< int > ¶meterIndices)
virtual bool resolveDependencies()
OptimizableGraph::Vertex * vertex()
ParameterVector _parameters
Cache(CacheContainer *container_=0, const ParameterVector ¶meters_=ParameterVector())
virtual void updateImpl()=0
redefine this to do the update
create vertices and edges based on TAGs in, for example, a file
static Factory * instance()
return the instance
HyperGraph::HyperGraphElement * construct(const std::string &tag) const
const std::string & tag(const HyperGraph::HyperGraphElement *v) const
return the TAG given a vertex
A general case Vertex for optimization.
const OptimizableGraph * graph() const
#define __PRETTY_FUNCTION__
std::vector< Parameter * > ParameterVector