Go to the documentation of this file.
22 #include <gtsam/dllexport.h>
24 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
25 #include <boost/serialization/version.hpp>
26 #include <boost/serialization/nvp.hpp>
33 namespace serialization {
41 class GaussianFactorGraph;
42 struct PreconditionerParameters;
54 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
55 friend class boost::serialization::access;
56 template <
class Archive>
57 void serialize(Archive &ar,
const unsigned int ) {
58 ar &BOOST_SERIALIZATION_NVP(index);
59 ar &BOOST_SERIALIZATION_NVP(weight);
64 typedef std::vector<Edge>
Edges;
79 inline size_t size()
const {
return edges_.size(); }
80 EdgeIndices edgeIndices()
const;
90 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
91 friend class boost::serialization::access;
92 template <
class Archive>
93 void serialize(Archive &ar,
const unsigned int ) {
94 ar &BOOST_SERIALIZATION_NVP(edges_);
96 void save(
const std::string &
fn)
const;
97 static Subgraph load(
const std::string &
fn);
103 typedef std::shared_ptr<SubgraphBuilderParameters>
shared_ptr;
126 } augmentationWeight;
132 : skeletonType(KRUSKAL),
133 skeletonWeight(RANDOM),
134 augmentationWeight(SKELETON),
135 augmentationFactor(1.0) {}
140 virtual void print(std::ostream &
os)
const;
144 static Skeleton skeletonTranslator(
const std::string &
s);
145 static std::string skeletonTranslator(Skeleton
s);
146 static SkeletonWeight skeletonWeightTranslator(
const std::string &
s);
147 static std::string skeletonWeightTranslator(SkeletonWeight
w);
148 static AugmentationWeight augmentationWeightTranslator(
const std::string &
s);
149 static std::string augmentationWeightTranslator(AugmentationWeight
w);
166 const std::vector<double> &weights)
const;
171 const std::vector<double> &weights)
const;
172 std::vector<size_t> sample(
const std::vector<double> &weights,
173 const size_t t)
const;
185 std::pair<GaussianFactorGraph, GaussianFactorGraph> GTSAM_EXPORT
splitFactorGraph(
GaussianFactorGraph buildFactorSubgraph(const GaussianFactorGraph &gfg, const Subgraph &subgraph, const bool clone)
std::vector< size_t > kruskal(const FactorGraph< FACTOR > &fg, const std::vector< double > &weights)
const Edges & edges() const
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
Typedefs for easier changing of types.
SubgraphBuilder(const SubgraphBuilderParameters &p=SubgraphBuilderParameters())
vector< MFAS::KeyPair > edges
std::vector< double > Weights
std::vector< Edge > Edges
std::vector< size_t > EdgeIndices
ofstream os("timeSchurFactors.csv")
const_iterator end() const
SubgraphBuilderParameters parameters_
std::shared_ptr< SubgraphBuilderParameters > shared_ptr
Subgraph(const Edges &edges)
void print(const Matrix &A, const string &s, ostream &stream)
std::pair< GaussianFactorGraph, GaussianFactorGraph > splitFactorGraph(const GaussianFactorGraph &factorGraph, const Subgraph &subgraph)
double augmentationFactor
factor multiplied with n, yields number of extra edges.
virtual ~SubgraphBuilder()
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
Edges::const_iterator const_iterator
Subgraph(const Subgraph &subgraph)
bool isUnitWeight() const
void save(const Matrix &A, const string &s, const string &filename)
const_iterator begin() const
virtual ~SubgraphBuilderParameters()
SubgraphBuilderParameters()
A thin wrapper around std::map that uses boost's fast_pool_allocator.
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:03:52