g2o
|
#include <cache.h>
Classes | |
class | CacheKey |
Public Member Functions | |
Cache (CacheContainer *container_=0, const ParameterVector ¶meters_=ParameterVector()) | |
CacheKey | key () const |
OptimizableGraph::Vertex * | vertex () |
OptimizableGraph * | graph () |
CacheContainer * | container () |
ParameterVector & | parameters () |
void | update () |
virtual HyperGraph::HyperGraphElementType | elementType () const |
Public Member Functions inherited from g2o::HyperGraph::HyperGraphElement | |
virtual | ~HyperGraphElement () |
HyperGraphElement * | clone () const |
Protected Member Functions | |
virtual void | updateImpl ()=0 |
redefine this to do the update More... | |
Cache * | installDependency (const std::string &type_, const std::vector< int > ¶meterIndices) |
virtual bool | resolveDependancies () |
Protected Attributes | |
bool | _updateNeeded |
ParameterVector | _parameters |
std::vector< Cache * > | _parentCaches |
CacheContainer * | _container |
Friends | |
class | CacheContainer |
g2o::Cache::Cache | ( | CacheContainer * | container_ = 0 , |
const ParameterVector & | parameters_ = ParameterVector() |
||
) |
CacheContainer * g2o::Cache::container | ( | ) |
Definition at line 73 of file cache.cpp.
References _container.
Referenced by graph(), installDependency(), and vertex().
|
inlinevirtual |
returns the type of the graph element, see HyperGraphElementType
Implements g2o::HyperGraph::HyperGraphElement.
Definition at line 71 of file cache.h.
References HGET_CACHE.
OptimizableGraph * g2o::Cache::graph | ( | ) |
|
protected |
this function installs and satisfies a cache
type_ | the typename of the dependency |
parameterIndices | a vector containing the indices if the parameters in _parameters that will be used to assemble the Key of the cache being created For example if I have a cache of type C2, having parameters "A, B, and C", and it depends on a cache of type C1 that depends on the parameters A and C, the parameterIndices should contain "0, 2", since they are the positions in the parameter vector of C2 of the parameters needed to construct C1. |
Definition at line 97 of file cache.cpp.
References _parameters, _parentCaches, container(), g2o::CacheContainer::createCache(), and g2o::CacheContainer::findCache().
Cache::CacheKey g2o::Cache::key | ( | ) | const |
Definition at line 81 of file cache.cpp.
References _parameters, g2o::Factory::instance(), and g2o::Factory::tag().
ParameterVector & g2o::Cache::parameters | ( | ) |
|
protectedvirtual |
Function to be called from a cache that has dependencies. It just invokes a sequence of installDependency(). Although the caches returned are stored in the _parentCache vector, it is better that you redefine your own cache member variables, for better readability
Reimplemented in g2o::CacheSE2Offset, g2o::deprecated::CacheSE3Offset, g2o::CacheSE3Offset, g2o::deprecated::CacheCamera, g2o::CacheCamera, and g2o::tutorial::CacheSE2Offset.
Definition at line 116 of file cache.cpp.
Referenced by g2o::CacheContainer::createCache().
void g2o::Cache::update | ( | ) |
Definition at line 87 of file cache.cpp.
References _parentCaches, _updateNeeded, and updateImpl().
Referenced by g2o::CacheContainer::createCache(), and g2o::CacheContainer::update().
|
protectedpure virtual |
redefine this to do the update
Implemented in g2o::deprecated::CacheSE3Offset, g2o::CacheSE2Offset, g2o::CacheSE3Offset, g2o::deprecated::CacheCamera, g2o::CacheCamera, and g2o::tutorial::CacheSE2Offset.
Referenced by update().
OptimizableGraph::Vertex * g2o::Cache::vertex | ( | ) |
Definition at line 61 of file cache.cpp.
References container(), and g2o::CacheContainer::vertex().
Referenced by g2o::CacheSE3Offset::updateImpl(), g2o::CacheSE2Offset::updateImpl(), and g2o::deprecated::CacheSE3Offset::updateImpl().
|
friend |
|
protected |
Definition at line 101 of file cache.h.
Referenced by container(), and g2o::CacheContainer::createCache().
|
protected |
Definition at line 99 of file cache.h.
Referenced by g2o::CacheContainer::createCache(), installDependency(), key(), g2o::Cache::CacheKey::operator<(), parameters(), g2o::CacheSE3Offset::resolveDependancies(), g2o::deprecated::CacheSE3Offset::resolveDependancies(), and g2o::CacheSE2Offset::resolveDependancies().
|
protected |
Definition at line 100 of file cache.h.
Referenced by installDependency(), and update().
|
protected |
Definition at line 98 of file cache.h.
Referenced by g2o::CacheContainer::setUpdateNeeded(), update(), and g2o::CacheContainer::update().