| |
- pybind11_builtins.pybind11_object(builtins.object)
-
- CDirectedTree_mrpt_nav_TMoveEdgeSE2_TP_t
- ScalarFactorGraph
class ScalarFactorGraph(pybind11_builtins.pybind11_object) |
|
Sparse solver for GMRF (Gaussian Markov Random Fields) graphical models.
The design of this class is optimized for large problems (e.g. >1e3 nodes,
>1e4 constrainst)
by leaving to the user/caller the responsibility of allocating all "nodes"
and constraints.
This class can be seen as an intermediary solution between current methods
in mrpt::graphslam and the well-known G2O library:
Assumptions/limitations:
- Linear error functions (for now).
- Scalar (1-dim) error functions.
- Gaussian factors.
- Solver: Eigen SparseQR.
Usage:
- Call initialize() to set the number of nodes.
- Call addConstraints() to insert constraints. This may be called more than
once.
- Call updateEstimation() to run one step of the linear SparseQR solver. |
|
- Method resolution order:
- ScalarFactorGraph
- pybind11_builtins.pybind11_object
- builtins.object
Methods defined here:
- __init__(...)
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph) -> None
2. __init__(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, arg0: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph) -> None
- addConstraint(...)
- addConstraint(*args, **kwargs)
Overloaded function.
1. addConstraint(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, listOfConstraints: mrpt::graphs::ScalarFactorGraph::UnaryFactorVirtualBase) -> None
Insert constraints into the GMRF problem.
List of user-implemented constraints.
**A pointer to the passed object is kept**, but memory ownship *REMAINS*
being responsability of the caller. This is
done such that arrays/vectors of constraints can be more efficiently
allocated if their type is known at build time.
C++: mrpt::graphs::ScalarFactorGraph::addConstraint(const struct mrpt::graphs::ScalarFactorGraph::UnaryFactorVirtualBase &) --> void
2. addConstraint(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, listOfConstraints: mrpt::graphs::ScalarFactorGraph::BinaryFactorVirtualBase) -> None
C++: mrpt::graphs::ScalarFactorGraph::addConstraint(const struct mrpt::graphs::ScalarFactorGraph::BinaryFactorVirtualBase &) --> void
- assign(...)
- assign(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, : mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph) -> mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph
C++: mrpt::graphs::ScalarFactorGraph::operator=(const class mrpt::graphs::ScalarFactorGraph &) --> class mrpt::graphs::ScalarFactorGraph &
- clear(...)
- clear(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph) -> None
Reset state: remove all constraints and nodes.
C++: mrpt::graphs::ScalarFactorGraph::clear() --> void
- clearAllConstraintsByType_Binary(...)
- clearAllConstraintsByType_Binary(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph) -> None
C++: mrpt::graphs::ScalarFactorGraph::clearAllConstraintsByType_Binary() --> void
- clearAllConstraintsByType_Unary(...)
- clearAllConstraintsByType_Unary(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph) -> None
C++: mrpt::graphs::ScalarFactorGraph::clearAllConstraintsByType_Unary() --> void
- enableProfiler(...)
- enableProfiler(*args, **kwargs)
Overloaded function.
1. enableProfiler(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph) -> None
2. enableProfiler(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, enable: bool) -> None
C++: mrpt::graphs::ScalarFactorGraph::enableProfiler(bool) --> void
- eraseConstraint(...)
- eraseConstraint(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, c: mrpt::graphs::ScalarFactorGraph::FactorBase) -> bool
Removes a constraint. Return true if found and deleted correctly.
C++: mrpt::graphs::ScalarFactorGraph::eraseConstraint(const struct mrpt::graphs::ScalarFactorGraph::FactorBase &) --> bool
- initialize(...)
- initialize(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, nodeCount: int) -> None
Initialize the GMRF internal state and copy the prior factors.
C++: mrpt::graphs::ScalarFactorGraph::initialize(size_t) --> void
- isProfilerEnabled(...)
- isProfilerEnabled(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph) -> bool
C++: mrpt::graphs::ScalarFactorGraph::isProfilerEnabled() const --> bool
- updateEstimation(...)
- updateEstimation(*args, **kwargs)
Overloaded function.
1. updateEstimation(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, solved_x_inc: mrpt::math::CVectorDynamic<double>) -> None
2. updateEstimation(self: mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph, solved_x_inc: mrpt::math::CVectorDynamic<double>, solved_variances: mrpt::math::CVectorDynamic<double>) -> None
C++: mrpt::graphs::ScalarFactorGraph::updateEstimation(class mrpt::math::CVectorDynamic<double> &, class mrpt::math::CVectorDynamic<double> *) --> void
Data and other attributes defined here:
- BinaryFactorVirtualBase = <class 'mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph.BinaryFactorVirtualBase'>
- Simple, scalar (1-dim) constraint (edge) for a GMRF
- FactorBase = <class 'mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph.FactorBase'>
- UnaryFactorVirtualBase = <class 'mrpt.pymrpt.mrpt.graphs.ScalarFactorGraph.UnaryFactorVirtualBase'>
- Simple, scalar (1-dim) constraint (edge) for a GMRF
Static methods inherited from pybind11_builtins.pybind11_object:
- __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
- Create and return a new object. See help(type) for accurate signature.
| |