Classes | |
struct | Cuts |
struct | GenericFactor2D |
struct | GenericFactor3D |
struct | GenericNode2D |
struct | GenericNode3D |
struct | GenericUnaryFactor |
struct | MetisResult |
class | NestedDissection |
struct | WorkSpace |
Typedefs | |
typedef std::vector< sharedGenericFactor2D > | GenericGraph2D |
typedef std::vector< sharedGenericFactor3D > | GenericGraph3D |
typedef std::vector< sharedGenericUnaryFactor > | GenericUnaryGraph |
typedef std::vector< int > | PartitionTable |
typedef std::shared_ptr< GenericFactor2D > | sharedGenericFactor2D |
typedef std::shared_ptr< GenericFactor3D > | sharedGenericFactor3D |
typedef std::shared_ptr< GenericUnaryFactor > | sharedGenericUnaryFactor |
typedef boost::shared_array< idx_t > | sharedInts |
Enumerations | |
enum | GenericNode2DType { NODE_POSE_2D, NODE_LANDMARK_2D } |
enum | GenericNode3DType { NODE_POSE_3D, NODE_LANDMARK_3D } |
Functions | |
template<class GenericGraph > | |
void | addLandmarkToPartitionResult (const GenericGraph &graph, const std::vector< size_t > &landmarkKeys, MetisResult &partitionResult, WorkSpace &workspace) |
void | checkSingularity (const GenericGraph2D &graph, const std::vector< size_t > &frontals, WorkSpace &workspace, const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark) |
void | checkSingularity (const GenericGraph3D &graph, const std::vector< size_t > &frontals, WorkSpace &workspace, const size_t minNrConstraintsPerCamera, const size_t minNrConstraintsPerLandmark) |
DSFVector | createDSF (const GenericGraph3D &graph, const vector< size_t > &keys, const WorkSpace &workspace) |
std::pair< int, sharedInts > | edgeMetis (idx_t n, const sharedInts &xadj, const sharedInts &adjncy, const sharedInts &adjwgt, bool verbose) |
template<class GenericGraph > | |
std::optional< MetisResult > | edgePartitionByMetis (const GenericGraph &graph, const std::vector< size_t > &keys, WorkSpace &workspace, bool verbose) |
std::list< std::vector< size_t > > GTSAM_UNSTABLE_EXPORT | findIslands (const GenericGraph2D &graph, const std::vector< size_t > &keys, WorkSpace &workspace, const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark) |
list< vector< size_t > > | findIslands (const GenericGraph2D &graph, const vector< size_t > &keys, WorkSpace &workspace, const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark) |
std::list< std::vector< size_t > > GTSAM_UNSTABLE_EXPORT | findIslands (const GenericGraph3D &graph, const std::vector< size_t > &keys, WorkSpace &workspace, const size_t minNrConstraintsPerCamera, const size_t minNrConstraintsPerLandmark) |
list< vector< size_t > > | findIslands (const GenericGraph3D &graph, const vector< size_t > &keys, WorkSpace &workspace, const size_t minNrConstraintsPerCamera, const size_t minNrConstraintsPerLandmark) |
template<class GenericGraph > | |
std::optional< MetisResult > | findPartitoning (const GenericGraph &graph, const std::vector< size_t > &keys, WorkSpace &workspace, bool verbose, const std::optional< std::vector< Symbol > > &int2symbol, const bool reduceGraph) |
template<class GenericGraph > | |
int | findSeparator (const GenericGraph &graph, const std::vector< size_t > &keys, const int minNodesPerMap, WorkSpace &workspace, bool verbose, const std::optional< std::vector< Symbol > > &int2symbol, const bool reduceGraph, const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark) |
void | findSingularCamerasLandmarks (const GenericGraph3D &graph, const WorkSpace &workspace, const vector< bool > &isCamera, const vector< bool > &isLandmark, set< size_t > &singularCameras, set< size_t > &singularLandmarks, vector< int > &nrConstraints, bool &foundSingularCamera, bool &foundSingularLandmark, const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark) |
int | getNrCommonLandmarks (const vector< size_t > &landmarks1, const vector< size_t > &landmarks2) |
bool | hasCommonCamera (const std::set< size_t > &cameras1, const std::set< size_t > &cameras2) |
bool | isLargerIsland (const std::vector< size_t > &island1, const std::vector< size_t > &island2) |
bool | isSingular (const set< size_t > &singularCameras, const set< size_t > &singularLandmarks, const GenericNode3D &node) |
void | modefied_EdgeComputeSeparator (idx_t *nvtxs, idx_t *xadj, idx_t *adjncy, idx_t *vwgt, idx_t *adjwgt, idx_t *options, idx_t *edgecut, idx_t *part) |
template<class GenericGraph > | |
void | prepareMetisGraph (const GenericGraph &graph, const std::vector< size_t > &keys, WorkSpace &workspace, sharedInts *ptr_xadj, sharedInts *ptr_adjncy, sharedInts *ptr_adjwgt) |
void | print (const GenericGraph2D &graph, const std::string name) |
void | print (const GenericGraph3D &graph, const std::string name) |
void | printIsland (const std::vector< size_t > &island) |
void | printIslands (const std::list< std::vector< size_t > > &islands) |
void | printNumCamerasLandmarks (const std::vector< size_t > &keys, const std::vector< Symbol > &int2symbol) |
void | reduceGenericGraph (const GenericGraph2D &graph, const std::vector< size_t > &cameraKeys, const std::vector< size_t > &landmarkKeys, const std::vector< int > &dictionary, GenericGraph2D &reducedGraph) |
void | reduceGenericGraph (const GenericGraph3D &graph, const std::vector< size_t > &cameraKeys, const std::vector< size_t > &landmarkKeys, const std::vector< int > &dictionary, GenericGraph3D &reducedGraph) |
std::pair< idx_t, sharedInts > | separatorMetis (idx_t n, const sharedInts &xadj, const sharedInts &adjncy, const sharedInts &adjwgt, bool verbose) |
template<class GenericGraph > | |
std::optional< MetisResult > | separatorPartitionByMetis (const GenericGraph &graph, const std::vector< size_t > &keys, WorkSpace &workspace, bool verbose) |
typedef std::vector<sharedGenericFactor2D> gtsam::partition::GenericGraph2D |
Definition at line 50 of file GenericGraph.h.
typedef std::vector<sharedGenericFactor3D> gtsam::partition::GenericGraph3D |
Definition at line 98 of file GenericGraph.h.
typedef std::vector<sharedGenericUnaryFactor> gtsam::partition::GenericUnaryGraph |
Definition at line 131 of file GenericGraph.h.
typedef std::vector<int> gtsam::partition::PartitionTable |
Definition at line 16 of file PartitionWorkSpace.h.
typedef std::shared_ptr<GenericFactor2D> gtsam::partition::sharedGenericFactor2D |
graph is a collection of factors
Definition at line 49 of file GenericGraph.h.
typedef std::shared_ptr<GenericFactor3D> gtsam::partition::sharedGenericFactor3D |
graph is a collection of factors
Definition at line 97 of file GenericGraph.h.
typedef std::shared_ptr<GenericUnaryFactor> gtsam::partition::sharedGenericUnaryFactor |
graph is a collection of factors
Definition at line 130 of file GenericGraph.h.
typedef boost::shared_array<idx_t> gtsam::partition::sharedInts |
Definition at line 34 of file FindSeparator-inl.h.
Enumerator | |
---|---|
NODE_POSE_2D | |
NODE_LANDMARK_2D |
Definition at line 26 of file GenericGraph.h.
Enumerator | |
---|---|
NODE_POSE_3D | |
NODE_LANDMARK_3D |
Definition at line 72 of file GenericGraph.h.
void gtsam::partition::addLandmarkToPartitionResult | ( | const GenericGraph & | graph, |
const std::vector< size_t > & | landmarkKeys, | ||
MetisResult & | partitionResult, | ||
WorkSpace & | workspace | ||
) |
Definition at line 395 of file FindSeparator-inl.h.
|
inline |
check whether the 2D graph is singular (under constrained) , Dummy function for 2D
Definition at line 63 of file GenericGraph.h.
void gtsam::partition::checkSingularity | ( | const GenericGraph3D & | graph, |
const std::vector< size_t > & | frontals, | ||
WorkSpace & | workspace, | ||
const size_t | minNrConstraintsPerCamera, | ||
const size_t | minNrConstraintsPerLandmark | ||
) |
check whether the 3D graph is singular (under constrained)
Definition at line 407 of file GenericGraph.cpp.
DSFVector gtsam::partition::createDSF | ( | const GenericGraph3D & | graph, |
const vector< size_t > & | keys, | ||
const WorkSpace & | workspace | ||
) |
Definition at line 130 of file GenericGraph.cpp.
std::pair<int, sharedInts> gtsam::partition::edgeMetis | ( | idx_t | n, |
const sharedInts & | xadj, | ||
const sharedInts & | adjncy, | ||
const sharedInts & | adjwgt, | ||
bool | verbose | ||
) |
Return the number of edge cuts and the partition indices {part} Part [j] is 0 or 1, depending on whether node j is in the left part of the graph or the right part respectively
Definition at line 130 of file FindSeparator-inl.h.
std::optional<MetisResult> gtsam::partition::edgePartitionByMetis | ( | const GenericGraph & | graph, |
const std::vector< size_t > & | keys, | ||
WorkSpace & | workspace, | ||
bool | verbose | ||
) |
Definition at line 293 of file FindSeparator-inl.h.
std::list<std::vector<size_t> > GTSAM_UNSTABLE_EXPORT gtsam::partition::findIslands | ( | const GenericGraph2D & | graph, |
const vector< size_t > & | keys, | ||
WorkSpace & | workspace, | ||
const int | minNrConstraintsPerCamera, | ||
const int | minNrConstraintsPerLandmark | ||
) |
merge nodes in DSF using constraints captured by the given graph
Note: Need to be able to handle a graph with factors that involve variables not in the given {keys}
Definition at line 23 of file GenericGraph.cpp.
list<vector<size_t> > gtsam::partition::findIslands | ( | const GenericGraph2D & | graph, |
const vector< size_t > & | keys, | ||
WorkSpace & | workspace, | ||
const int | minNrConstraintsPerCamera, | ||
const int | minNrConstraintsPerLandmark | ||
) |
Note: Need to be able to handle a graph with factors that involve variables not in the given {keys}
Definition at line 23 of file GenericGraph.cpp.
std::list<std::vector<size_t> > GTSAM_UNSTABLE_EXPORT gtsam::partition::findIslands | ( | const GenericGraph3D & | graph, |
const std::vector< size_t > & | keys, | ||
WorkSpace & | workspace, | ||
const size_t | minNrConstraintsPerCamera, | ||
const size_t | minNrConstraintsPerLandmark | ||
) |
merge nodes in DSF using constraints captured by the given graph
Definition at line 240 of file GenericGraph.cpp.
list<vector<size_t> > gtsam::partition::findIslands | ( | const GenericGraph3D & | graph, |
const std::vector< size_t > & | keys, | ||
WorkSpace & | workspace, | ||
const size_t | minNrConstraintsPerCamera, | ||
const size_t | minNrConstraintsPerLandmark | ||
) |
merge nodes in DSF using constraints captured by the given graph
Definition at line 240 of file GenericGraph.cpp.
std::optional<MetisResult> gtsam::partition::findPartitoning | ( | const GenericGraph & | graph, |
const std::vector< size_t > & | keys, | ||
WorkSpace & | workspace, | ||
bool | verbose, | ||
const std::optional< std::vector< Symbol > > & | int2symbol, | ||
const bool | reduceGraph | ||
) |
Definition at line 443 of file FindSeparator-inl.h.
int gtsam::partition::findSeparator | ( | const GenericGraph & | graph, |
const std::vector< size_t > & | keys, | ||
const int | minNodesPerMap, | ||
WorkSpace & | workspace, | ||
bool | verbose, | ||
const std::optional< std::vector< Symbol > > & | int2symbol, | ||
const bool | reduceGraph, | ||
const int | minNrConstraintsPerCamera, | ||
const int | minNrConstraintsPerLandmark | ||
) |
return the number of submaps and the parition table of the partitioned graph (stored in workspace.partitionTable). return 0 if failed Note that the original output of Metis is 0,1 for submap, and 2 for the separator.
Definition at line 489 of file FindSeparator-inl.h.
void gtsam::partition::findSingularCamerasLandmarks | ( | const GenericGraph3D & | graph, |
const WorkSpace & | workspace, | ||
const vector< bool > & | isCamera, | ||
const vector< bool > & | isLandmark, | ||
set< size_t > & | singularCameras, | ||
set< size_t > & | singularLandmarks, | ||
vector< int > & | nrConstraints, | ||
bool & | foundSingularCamera, | ||
bool & | foundSingularLandmark, | ||
const int | minNrConstraintsPerCamera, | ||
const int | minNrConstraintsPerLandmark | ||
) |
Definition at line 196 of file GenericGraph.cpp.
|
inline |
Definition at line 336 of file GenericGraph.cpp.
|
inline |
Definition at line 136 of file GenericGraph.h.
bool gtsam::partition::isLargerIsland | ( | const std::vector< size_t > & | island1, |
const std::vector< size_t > & | island2 | ||
) |
Definition at line 365 of file FindSeparator-inl.h.
|
inline |
Definition at line 184 of file GenericGraph.cpp.
void gtsam::partition::modefied_EdgeComputeSeparator | ( | idx_t * | nvtxs, |
idx_t * | xadj, | ||
idx_t * | adjncy, | ||
idx_t * | vwgt, | ||
idx_t * | adjwgt, | ||
idx_t * | options, | ||
idx_t * | edgecut, | ||
idx_t * | part | ||
) |
Definition at line 82 of file FindSeparator-inl.h.
void gtsam::partition::prepareMetisGraph | ( | const GenericGraph & | graph, |
const std::vector< size_t > & | keys, | ||
WorkSpace & | workspace, | ||
sharedInts * | ptr_xadj, | ||
sharedInts * | ptr_adjncy, | ||
sharedInts * | ptr_adjwgt | ||
) |
Prepare the data structure {xadj} and {adjncy} required by metis xadj always has the size equal to the no. of the nodes plus 1 adjncy always has the size equal to two times of the no. of the edges in the Metis graph
Definition at line 179 of file FindSeparator-inl.h.
void gtsam::partition::print | ( | const GenericGraph2D & | graph, |
const std::string | name = "GenericGraph2D" |
||
) |
print the graph
Definition at line 114 of file GenericGraph.cpp.
void gtsam::partition::print | ( | const GenericGraph3D & | graph, |
const std::string | name = "GenericGraph3D" |
||
) |
print the graph
Definition at line 121 of file GenericGraph.cpp.
void gtsam::partition::printIsland | ( | const std::vector< size_t > & | island | ) |
Definition at line 371 of file FindSeparator-inl.h.
void gtsam::partition::printIslands | ( | const std::list< std::vector< size_t > > & | islands | ) |
Definition at line 378 of file FindSeparator-inl.h.
void gtsam::partition::printNumCamerasLandmarks | ( | const std::vector< size_t > & | keys, |
const std::vector< Symbol > & | int2symbol | ||
) |
Definition at line 383 of file FindSeparator-inl.h.
|
inline |
eliminate the sensors from generic graph
Definition at line 57 of file GenericGraph.h.
void GTSAM_UNSTABLE_EXPORT gtsam::partition::reduceGenericGraph | ( | const GenericGraph3D & | graph, |
const std::vector< size_t > & | cameraKeys, | ||
const std::vector< size_t > & | landmarkKeys, | ||
const std::vector< int > & | dictionary, | ||
GenericGraph3D & | reducedGraph | ||
) |
eliminate the sensors from generic graph
Definition at line 353 of file GenericGraph.cpp.
std::pair<idx_t, sharedInts> gtsam::partition::separatorMetis | ( | idx_t | n, |
const sharedInts & | xadj, | ||
const sharedInts & | adjncy, | ||
const sharedInts & | adjwgt, | ||
bool | verbose | ||
) |
Return the size of the separator and the partiion indices {part} Part [j] is 0, 1, or 2, depending on whether node j is in the left part of the graph, the right part, or the separator, respectively
Definition at line 43 of file FindSeparator-inl.h.
std::optional< MetisResult > gtsam::partition::separatorPartitionByMetis | ( | const GenericGraph & | graph, |
const std::vector< size_t > & | keys, | ||
WorkSpace & | workspace, | ||
bool | verbose | ||
) |
use Metis library to partition, return the size of separator and the optional partition table the size of dictionary mush be equal to the number of variables in the original graph (the largest one)
Definition at line 241 of file FindSeparator-inl.h.