Aikido
aikido::constraint::CartesianProductTestable Class Reference

Testable for CompoundStates. More...

#include <aikido/constraint/CartesianProductTestable.hpp>

Inheritance diagram for aikido::constraint::CartesianProductTestable:
aikido::constraint::Testable

Public Member Functions

 CartesianProductTestable (std::shared_ptr< const statespace::CartesianProduct > _stateSpace, std::vector< ConstTestablePtr > _constraints)
 Constructor. More...
 
statespace::ConstStateSpacePtr getStateSpace () const override
 Returns StateSpace in which this constraint operates. More...
 
bool isSatisfied (const aikido::statespace::StateSpace::State *_state, TestableOutcome *outcome=nullptr) const override
 Returns true if state satisfies this constraint. More...
 
std::unique_ptr< TestableOutcomecreateOutcome () const override
 Return an instance of DefaultTestableOutcome, since this class doesn't have a more specialized TestableOutcome derivative assigned to it. More...
 
- Public Member Functions inherited from aikido::constraint::Testable
virtual ~Testable ()=default
 

Private Attributes

std::shared_ptr< const statespace::CartesianProductmStateSpace
 
std::vector< ConstTestablePtrmConstraints
 

Detailed Description

Testable for CompoundStates.

It takes in a set of Testables and test i-th substate on the i-th Testable.

Constructor & Destructor Documentation

◆ CartesianProductTestable()

aikido::constraint::CartesianProductTestable::CartesianProductTestable ( std::shared_ptr< const statespace::CartesianProduct _stateSpace,
std::vector< ConstTestablePtr _constraints 
)

Constructor.

Parameters
_stateSpaceStateSpace in which this constraint operates.
_constraintsSet of testables. The size of _constraints should match the number of subspaces in _stateSpace. i-th constraint applies to i-th subspace.

Member Function Documentation

◆ createOutcome()

std::unique_ptr<TestableOutcome> aikido::constraint::CartesianProductTestable::createOutcome ( ) const
overridevirtual

Return an instance of DefaultTestableOutcome, since this class doesn't have a more specialized TestableOutcome derivative assigned to it.

Implements aikido::constraint::Testable.

◆ getStateSpace()

statespace::ConstStateSpacePtr aikido::constraint::CartesianProductTestable::getStateSpace ( ) const
overridevirtual

Returns StateSpace in which this constraint operates.

Implements aikido::constraint::Testable.

◆ isSatisfied()

bool aikido::constraint::CartesianProductTestable::isSatisfied ( const aikido::statespace::StateSpace::State _state,
TestableOutcome outcome = nullptr 
) const
overridevirtual

Returns true if state satisfies this constraint.

Parameters
[in]_stategiven state to test.
[in]outcomepointer to TestableOutcome derivative instance that method will populate with useful information. Each derivative class of Testable may expect outcome to be a different derivative class of TestableOutcome (this casting and population is done under the hood). If this argument is missing, it is ignored.

Implements aikido::constraint::Testable.

Member Data Documentation

◆ mConstraints

std::vector<ConstTestablePtr> aikido::constraint::CartesianProductTestable::mConstraints
private

◆ mStateSpace

std::shared_ptr<const statespace::CartesianProduct> aikido::constraint::CartesianProductTestable::mStateSpace
private