MultiAgentDecisionProcess
IndexTools.h File Reference
#include <iostream>
#include "Globals.h"
#include "Scope.h"

Namespaces

 IndexTools
 IndexTools contains functionality for manipulating indices.
 

Functions

Index IndexTools::ActionAndObservation_to_ActionObservationIndex (Index aI, Index oI, size_t nrA, size_t nrO)
 Computation of a index for (joint) actionObservations. More...
 
Index IndexTools::ActionObservation_to_ActionIndex (Index aoI, size_t nrA, size_t nrO)
 Convert (joint) ActionObservation indices to (joint) Action indices. More...
 
Index IndexTools::ActionObservation_to_ObservationIndex (Index aoI, size_t nrA, size_t nrO)
 Convert (joint) ActionObservation indices to (joint) Observation indices. More...
 
size_t IndexTools::CalculateNumberOfSequences (size_t o, size_t seqLength)
 Calculate the number of sequences of length up to seqLength, for which at every time step o options are available. More...
 
size_t * IndexTools::CalculateStepSize (const std::vector< size_t > &nrElems)
 Calculates the step size array for nrElems. More...
 
size_t * IndexTools::CalculateStepSize (const std::vector< size_t > &nrElems, size_t n)
 Calculates the step size array from the first n entries of nrElems. More...
 
LIndexIndexTools::CalculateStepSize (const std::vector< LIndex > &nrElems)
 LIndex equivalent function. More...
 
std::vector< size_t > IndexTools::CalculateStepSizeVector (const std::vector< size_t > &nrElems)
 Calculates the step size vector for nrElems. More...
 
std::vector< LIndexIndexTools::CalculateStepSizeVector (const std::vector< LIndex > &nrElems)
 LIndex equivalent function. More...
 
template<typename T2 , typename T1 >
std::vector< T2 > convertVector (std::vector< T1 > v)
 
bool IndexTools::Increment (Index &index, size_t nrElems)
 Increments index which ranges over nrElems. More...
 
bool IndexTools::Increment (std::vector< Index > &indexVec, const std::vector< size_t > &nrElems)
 Increments vector of indices that range over nrElems. More...
 
bool IndexTools::Increment (LIndex &index, LIndex nrElems)
 LIndex equivalent function. More...
 
bool IndexTools::Increment (std::vector< LIndex > &indexVec, const std::vector< LIndex > &nrElems)
 LIndex equivalent function. More...
 
Index IndexTools::IndividualToJointIndices (const std::vector< Index > &indices, const std::vector< size_t > &nrElems)
 Convert individual to joint indices. More...
 
Index IndexTools::IndividualToJointIndices (const std::vector< Index > &indices, const std::vector< size_t > &nrElems, size_t n)
 Convert individual to joint indices. Only uses first n entries of vecs. More...
 
LIndex IndexTools::IndividualToJointIndices (const std::vector< LIndex > &indices, const std::vector< LIndex > &nrElems)
 LIndex equivalent function. More...
 
Index IndexTools::IndividualToJointIndicesArray (const Index *indices, const std::vector< size_t > &nrElems)
 A variant that takes an array instead of a vector for extra speed. More...
 
LIndex IndexTools::IndividualToJointIndicesArray (LIndex *indices, const std::vector< LIndex > &nrElems)
 LIndex equivalent function. More...
 
Index IndexTools::IndividualToJointIndicesArrayStepSize (const Index *indices, const size_t *step_size, size_t vec_size)
 A variant that 1) takes an array instead of a vector and 2) takes a cached step_size array for extra speed. More...
 
Index IndexTools::IndividualToJointIndicesArrayStepSize (const Index *indices, const std::vector< size_t > &step_size, size_t vec_size)
 A variant with a step_size vector. More...
 
LIndex IndexTools::IndividualToJointIndicesArrayStepSize (LIndex *indices, const LIndex *step_size, size_t vec_size)
 LIndex equivalent function. More...
 
LIndex IndexTools::IndividualToJointIndicesArrayStepSize (LIndex *indices, const std::vector< LIndex > &step_size, size_t vec_size)
 LIndex equivalent function. More...
 
Index IndexTools::IndividualToJointIndicesStepSize (const std::vector< Index > &indices, const std::vector< size_t > &step_size)
 A variant that takes a cached step_size vector for extra speed. More...
 
Index IndexTools::IndividualToJointIndicesStepSize (const std::vector< Index > &indices, const size_t *step_size)
 A variant that takes a cached step_size array for extra speed. More...
 
LIndex IndexTools::IndividualToJointIndicesStepSize (const std::vector< LIndex > &indices, const std::vector< LIndex > &step_size)
 LIndex equivalent function. More...
 
LIndex IndexTools::IndividualToJointIndicesStepSize (const std::vector< LIndex > &indices, const LIndex *step_size)
 LIndex equivalent function. More...
 
std::vector< IndexIndexTools::JointToIndividualIndices (Index jointI, const std::vector< size_t > &nrElems)
 Convert individual to joint indices. More...
 
void IndexTools::JointToIndividualIndices (Index jointI, const std::vector< size_t > &nrElems, std::vector< Index > &result)
 Convert individual to joint indices. More...
 
std::vector< LIndexIndexTools::JointToIndividualIndices (LIndex jointI, const std::vector< LIndex > &nrElems)
 LIndex equivalent function. More...
 
const IndexIndexTools::JointToIndividualIndicesArrayStepSize (Index jointI, const size_t *stepSize, size_t vec_size)
 Convert individual to joint indices - taking the stepSize array as an argument and returning a pointer to a array. More...
 
const LIndexIndexTools::JointToIndividualIndicesArrayStepSize (LIndex jointI, const LIndex *stepSize, size_t vec_size)
 LIndex equivalent function. More...
 
std::vector< IndexIndexTools::JointToIndividualIndicesStepSize (Index jointI, const size_t *stepSize, size_t vec_size)
 Convert individual to joint indices - taking the stepSize array as an argument. More...
 
void IndexTools::JointToIndividualIndicesStepSize (Index jointI, const size_t *stepSize, size_t vec_size, std::vector< Index > &result)
 Convert individual to joint indices, taking the stepSize array as an argument. More...
 
std::vector< IndexIndexTools::JointToIndividualIndicesStepSize (Index jointI, const std::vector< size_t > &stepSize, size_t vec_size)
 Convert individual to joint indices - taking the stepSize array as an argument. More...
 
std::vector< IndexIndexTools::JointToIndividualIndicesStepSize (Index jointI, const std::vector< size_t > &stepSize)
 
std::vector< LIndexIndexTools::JointToIndividualIndicesStepSize (LIndex jointI, const LIndex *stepSize, size_t vec_size)
 LIndex equivalent function. More...
 
std::vector< LIndexIndexTools::JointToIndividualIndicesStepSize (LIndex jointI, const std::vector< LIndex > &stepSize, size_t vec_size)
 LIndex equivalent function. More...
 
std::vector< LIndexIndexTools::JointToIndividualIndicesStepSize (LIndex jointI, const std::vector< LIndex > &stepSize)
 
template<typename T >
void IndexTools::RestrictIndividualIndicesToNarrowerScope (const std::vector< T > &indivIndices, const Scope &old_sc, const Scope &new_sc, std::vector< T > &restrictedIndivIndices)
 Restricts a vector of indices with a current scope to a narrower scope. More...
 
template<typename T >
void IndexTools::RestrictIndividualIndicesToScope (const std::vector< T > &indivIndices, const Scope &sc, std::vector< T > &restrictedIndivIndices)
 Restrict a vector of indices to a scope. More...
 

Function Documentation

template<typename T2 , typename T1 >
std::vector<T2> convertVector ( std::vector< T1 >  v)