Functions | |
template<class T> | |
std::ostream & | ompl::base::operator<< (std::ostream &out, const ScopedState< T > &state) |
Overload stream output operator. Calls ompl::base::StateSpace::printState() | |
template<class T, class Y> | |
ScopedState< T > & | ompl::base::operator<< (ScopedState< T > &to, const ScopedState< Y > &from) |
This is a fancy version of the assignment operator. It is a partial assignment, in some sense. The difference is that if the states are part of compound state spaces, the data is copied from from to to on a component by component basis. State spaces are matched by name. If the state space for to contains any subspace whose name matches any subspace of the state space for from, the corresponding state components are copied. | |
template<class T, class Y> | |
const ScopedState< T > & | ompl::base::operator>> (const ScopedState< T > &from, ScopedState< Y > &to) |
This is a fancy version of the assignment operator. It is a partial assignment, in some sense. The difference is that if the states are part of compound state spaces, the data is copied from from to to on a component by component basis. State spaces are matched by name. If the state space for to contains any subspace whose name matches any subspace of the state space for from, the corresponding state components are copied. | |
template<class T, class Y> | |
const ScopedState | ompl::base::operator^ (const ScopedState< T > &a, const ScopedState< Y > &b) |
Given state a from state space A and state b from state space B, construct a state from state space A. | |
StateSpacePtr | ompl::base::operator+ (const StateSpacePtr &a, const StateSpacePtr &b) |
Construct a compound state space from two existing state spaces. The components of this compound space are a (or the components of a, if a is compound) and b (or the components of b, if b is compound). State spaces are identified by name. Duplicates are checked for and added only once. If the compound state space would end up containing solely one component, that component is returned instead. | |
StateSpacePtr | ompl::base::operator- (const StateSpacePtr &a, const StateSpacePtr &b) |
Construct a compound state space that contains subspaces only from a. If a is compound, b (or the components from b, if b is compound) are removed and the remaining components are returned as a compound state space. If the compound space would end up containing solely one component, that component is returned instead. | |
StateSpacePtr | ompl::base::operator- (const StateSpacePtr &a, const std::string &name) |
Construct a compound state space that contains subspaces only from a, except for maybe the one named name. | |
StateSpacePtr | ompl::base::operator* (const StateSpacePtr &a, const StateSpacePtr &b) |
Construct a compound state space that contains subspaces that are in both a and b. |
Detailed Description
These operators are intended to simplify code that manipulates states and state spaces. They rely on the fact that state spaces have unique names. Here are some examples for using these operators:
These state spaces can be used when operating with states:
Function Documentation
◆ operator*()
StateSpacePtr ompl::base::operator* | ( | const StateSpacePtr & | a, |
const StateSpacePtr & | b ) |
Construct a compound state space that contains subspaces that are in both a and b.
Definition at line 1560 of file StateSpace.cpp.
◆ operator+()
StateSpacePtr ompl::base::operator+ | ( | const StateSpacePtr & | a, |
const StateSpacePtr & | b ) |
Construct a compound state space from two existing state spaces. The components of this compound space are a (or the components of a, if a is compound) and b (or the components of b, if b is compound). State spaces are identified by name. Duplicates are checked for and added only once. If the compound state space would end up containing solely one component, that component is returned instead.
Definition at line 1365 of file StateSpace.cpp.
◆ operator-() [1/2]
StateSpacePtr ompl::base::operator- | ( | const StateSpacePtr & | a, |
const StateSpacePtr & | b ) |
Construct a compound state space that contains subspaces only from a. If a is compound, b (or the components from b, if b is compound) are removed and the remaining components are returned as a compound state space. If the compound space would end up containing solely one component, that component is returned instead.
Definition at line 1453 of file StateSpace.cpp.
◆ operator-() [2/2]
StateSpacePtr ompl::base::operator- | ( | const StateSpacePtr & | a, |
const std::string & | name ) |
Construct a compound state space that contains subspaces only from a, except for maybe the one named name.
Definition at line 1514 of file StateSpace.cpp.
◆ operator<<() [1/2]
|
inline |
This is a fancy version of the assignment operator. It is a partial assignment, in some sense. The difference is that if the states are part of compound state spaces, the data is copied from from to to on a component by component basis. State spaces are matched by name. If the state space for to contains any subspace whose name matches any subspace of the state space for from, the corresponding state components are copied.
Definition at line 492 of file ScopedState.h.
◆ operator<<() [2/2]
|
inline |
Overload stream output operator. Calls ompl::base::StateSpace::printState()
Definition at line 492 of file ScopedState.h.
◆ operator>>()
|
inline |
This is a fancy version of the assignment operator. It is a partial assignment, in some sense. The difference is that if the states are part of compound state spaces, the data is copied from from to to on a component by component basis. State spaces are matched by name. If the state space for to contains any subspace whose name matches any subspace of the state space for from, the corresponding state components are copied.
Definition at line 522 of file ScopedState.h.
◆ operator^()
|
inline |
Given state a from state space A and state b from state space B, construct a state from state space A.
- B. The resulting state contains all the information from the input states (the states are concatenated).
Definition at line 533 of file ScopedState.h.