symbolic
Classes | Public Types | Public Member Functions | List of all members
symbolic::StateIndex Class Reference

#include <state.h>

Classes

class  iterator
 

Public Types

using IndexedState = Eigen::Array< bool, Eigen::Dynamic, 1 >
 

Public Member Functions

 StateIndex (const std::vector< Predicate > &predicates, bool use_cache=true)
 
Proposition GetProposition (size_t idx_proposition) const
 
size_t GetPropositionIndex (const Proposition &prop) const
 
State GetState (Eigen::Ref< const IndexedState > indexed_state) const
 
IndexedState GetIndexedState (const State &state) const
 
size_t size () const
 
iterator begin () const
 
iterator end () const
 
const Pddlpddl () const
 

Detailed Description

Database to convert between indexed and regular state.

States are represented as Eigen boolean arrays.

Constructor & Destructor Documentation

◆ StateIndex()

symbolic::StateIndex::StateIndex ( const std::vector< Predicate > &  predicates,
bool  use_cache = true 
)
explicit

Construct the index from the given predicates.

Parameters
predicatesPddl predicates.
use_cacheCache proposition lookups.

Member Function Documentation

◆ GetIndexedState()

StateIndex::IndexedState symbolic::StateIndex::GetIndexedState ( const State state) const

Convert the state into an indexed state.

Parameters
stateState.
Returns
Indexed state.

◆ GetProposition()

Proposition symbolic::StateIndex::GetProposition ( size_t  idx_proposition) const

Get a proposition from the index.

Parameters
idx_propositionIndex of proposition.
Returns
Proposition at given index.

◆ GetPropositionIndex()

size_t symbolic::StateIndex::GetPropositionIndex ( const Proposition prop) const

Get the index of a proposition.

Parameters
propProposition.
Returns
Proposition index.

◆ GetState()

State symbolic::StateIndex::GetState ( Eigen::Ref< const IndexedState >  indexed_state) const

Convert the indexed state to a full state.

Parameters
indexed_stateIndexed state.
Returns
Full state.

◆ size()

size_t symbolic::StateIndex::size ( ) const
inline

Size of indexed state (total number of propositions).


The documentation for this class was generated from the following files: