本文整理汇总了C++中optimizablegraph::Edge::resolveParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ Edge::resolveParameters方法的具体用法?C++ Edge::resolveParameters怎么用?C++ Edge::resolveParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类optimizablegraph::Edge
的用法示例。
在下文中一共展示了Edge::resolveParameters方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addEdge
bool OptimizableGraph::addEdge(HyperGraph::Edge* e_)
{
OptimizableGraph::Edge* e = dynamic_cast<OptimizableGraph::Edge*>(e_);
assert(e && "Edge does not inherit from OptimizableGraph::Edge");
// std::cerr << "subclass of OptimizableGraph::Edge confirmed";
if (! e)
return false;
bool eresult = HyperGraph::addEdge(e);
if (! eresult)
return false;
// std::cerr << "called HyperGraph::addEdge" << std::endl;
e->_internalId = _nextEdgeId++;
if (e->numUndefinedVertices())
return true;
// std::cerr << "internalId set" << std::endl;
if (! e->resolveParameters()){
cerr << __FUNCTION__ << ": FATAL, cannot resolve parameters for edge " << e << endl;
return false;
}
// std::cerr << "parameters set" << std::endl;
if (! e->resolveCaches()){
cerr << __FUNCTION__ << ": FATAL, cannot resolve caches for edge " << e << endl;
return false;
}
// std::cerr << "updating jacobian size" << std::endl;
_jacobianWorkspace.updateSize(e);
// std::cerr << "about to return true" << std::endl;
return true;
}
示例2: addEdge
bool OptimizableGraph::addEdge(HyperGraph::Edge* e_)
{
OptimizableGraph::Edge* e = dynamic_cast<OptimizableGraph::Edge*>(e_);
assert(e && "Edge does not inherit from OptimizableGraph::Edge");
if (! e)
return false;
bool eresult = HyperGraph::addEdge(e);
if (! eresult)
return false;
e->_internalId = _nextEdgeId++;
if (! e->resolveParameters()){
cerr << __FUNCTION__ << ": FATAL, cannot resolve parameters for edge " << e << endl;
return false;
}
if (! e->resolveCaches()){
cerr << __FUNCTION__ << ": FATAL, cannot resolve caches for edge " << e << endl;
return false;
}
_jacobianWorkspace.updateSize(e);
return true;
}
示例3: setEdgeVertex
bool OptimizableGraph::setEdgeVertex(HyperGraph::Edge* e, int pos, HyperGraph::Vertex* v){
if (! HyperGraph::setEdgeVertex(e,pos,v)){
return false;
}
if (!e->numUndefinedVertices()){
#ifndef NDEBUG
OptimizableGraph::Edge* ee = dynamic_cast<OptimizableGraph::Edge*>(e);
assert(ee && "Edge is not a OptimizableGraph::Edge");
#else
OptimizableGraph::Edge* ee = static_cast<OptimizableGraph::Edge*>(e);
#endif
if (! ee->resolveParameters()){
cerr << __FUNCTION__ << ": FATAL, cannot resolve parameters for edge " << e << endl;
return false;
}
if (! ee->resolveCaches()){
cerr << __FUNCTION__ << ": FATAL, cannot resolve caches for edge " << e << endl;
return false;
}
_jacobianWorkspace.updateSize(e);
}
return true;
}