HOG2
Public Member Functions | Private Attributes | List of all members
ArmToArmCompressedHeuristic Class Reference

#include <RoboticArm.h>

Inheritance diagram for ArmToArmCompressedHeuristic:
Inheritance graph
[legend]
Collaboration diagram for ArmToArmCompressedHeuristic:
Collaboration graph
[legend]

Public Member Functions

 ArmToArmCompressedHeuristic (RoboticArm *ra, const char *file)
 
 ArmToArmCompressedHeuristic (RoboticArm *ra, std::vector< int > reductionPower, std::vector< int > offset)
 
 ArmToArmCompressedHeuristic (RoboticArm *ra, int numArms, int reductionPower, int offset=0)
 
 ~ArmToArmCompressedHeuristic ()
 
armAngles BuildHeuristic (armAngles &config)
 
armAngles BuildHeuristic (std::vector< armAngles > &config)
 
void AddState (armAngles &a, int dist)
 
uint64_t GetIndex (const armAngles &a) const
 
double HCost (const armAngles &from, const armAngles &to) const
 
void SetupGoal (const armAngles &referenceState) const
 
void Save (const char *file)
 
void Load (const char *file)
 
- Public Member Functions inherited from RoboticArmHeuristic
virtual ~RoboticArmHeuristic ()
 

Private Attributes

uint64_t theSize
 
std::vector< int > reduction
 
std::vector< int > values
 
std::vector< int > errors
 
armAngles goal
 
RoboticArmr
 
uint16_t * distances
 
uint64_t theMask
 
uint64_t theResult
 

Detailed Description

Definition at line 189 of file RoboticArm.h.

Constructor & Destructor Documentation

◆ ArmToArmCompressedHeuristic() [1/3]

ArmToArmCompressedHeuristic::ArmToArmCompressedHeuristic ( RoboticArm ra,
const char *  file 
)
inline

Definition at line 191 of file RoboticArm.h.

References Load(), and r.

◆ ArmToArmCompressedHeuristic() [2/3]

ArmToArmCompressedHeuristic::ArmToArmCompressedHeuristic ( RoboticArm ra,
std::vector< int >  reductionPower,
std::vector< int >  offset 
)
inline

Definition at line 196 of file RoboticArm.h.

References distances, r, reduction, theMask, theResult, and theSize.

◆ ArmToArmCompressedHeuristic() [3/3]

ArmToArmCompressedHeuristic::ArmToArmCompressedHeuristic ( RoboticArm ra,
int  numArms,
int  reductionPower,
int  offset = 0 
)
inline

Definition at line 218 of file RoboticArm.h.

References distances, r, reduction, theMask, theResult, and theSize.

◆ ~ArmToArmCompressedHeuristic()

ArmToArmCompressedHeuristic::~ArmToArmCompressedHeuristic ( )
inline

Definition at line 238 of file RoboticArm.h.

References distances.

Member Function Documentation

◆ AddState()

void ArmToArmCompressedHeuristic::AddState ( armAngles a,
int  dist 
)
inline

Definition at line 311 of file RoboticArm.h.

References armAngles::angles, distances, GetIndex(), theMask, and theResult.

Referenced by BuildHeuristic().

◆ BuildHeuristic() [1/2]

armAngles ArmToArmCompressedHeuristic::BuildHeuristic ( armAngles config)
inline

◆ BuildHeuristic() [2/2]

armAngles ArmToArmCompressedHeuristic::BuildHeuristic ( std::vector< armAngles > &  config)
inline

◆ GetIndex()

uint64_t ArmToArmCompressedHeuristic::GetIndex ( const armAngles a) const
inline

Definition at line 321 of file RoboticArm.h.

References armAngles::GetAngle(), armAngles::GetNumArms(), reduction, and theSize.

Referenced by AddState(), HCost(), and SetupGoal().

◆ HCost()

double ArmToArmCompressedHeuristic::HCost ( const armAngles from,
const armAngles to 
) const
inlinevirtual

Implements RoboticArmHeuristic.

Definition at line 335 of file RoboticArm.h.

References armAngles::angles, distances, errors, GetIndex(), goal, max, SetupGoal(), theMask, theResult, and values.

◆ Load()

void ArmToArmCompressedHeuristic::Load ( const char *  file)
inline

Definition at line 388 of file RoboticArm.h.

References distances, reduction, theMask, theResult, and theSize.

Referenced by ArmToArmCompressedHeuristic().

◆ Save()

void ArmToArmCompressedHeuristic::Save ( const char *  file)
inline

Definition at line 379 of file RoboticArm.h.

References distances, reduction, theMask, theResult, and theSize.

◆ SetupGoal()

void ArmToArmCompressedHeuristic::SetupGoal ( const armAngles referenceState) const
inline

Member Data Documentation

◆ distances

uint16_t* ArmToArmCompressedHeuristic::distances
private

◆ errors

std::vector<int> ArmToArmCompressedHeuristic::errors
mutableprivate

Definition at line 406 of file RoboticArm.h.

Referenced by HCost(), and SetupGoal().

◆ goal

armAngles ArmToArmCompressedHeuristic::goal
mutableprivate

Definition at line 407 of file RoboticArm.h.

Referenced by HCost(), and SetupGoal().

◆ r

RoboticArm* ArmToArmCompressedHeuristic::r
private

Definition at line 408 of file RoboticArm.h.

Referenced by ArmToArmCompressedHeuristic(), BuildHeuristic(), and SetupGoal().

◆ reduction

std::vector<int> ArmToArmCompressedHeuristic::reduction
private

Definition at line 402 of file RoboticArm.h.

Referenced by ArmToArmCompressedHeuristic(), GetIndex(), Load(), and Save().

◆ theMask

uint64_t ArmToArmCompressedHeuristic::theMask
private

Definition at line 410 of file RoboticArm.h.

Referenced by AddState(), ArmToArmCompressedHeuristic(), HCost(), Load(), Save(), and SetupGoal().

◆ theResult

uint64_t ArmToArmCompressedHeuristic::theResult
private

Definition at line 411 of file RoboticArm.h.

Referenced by AddState(), ArmToArmCompressedHeuristic(), HCost(), Load(), Save(), and SetupGoal().

◆ theSize

uint64_t ArmToArmCompressedHeuristic::theSize
private

Definition at line 401 of file RoboticArm.h.

Referenced by ArmToArmCompressedHeuristic(), BuildHeuristic(), GetIndex(), Load(), and Save().

◆ values

std::vector<int> ArmToArmCompressedHeuristic::values
mutableprivate

Definition at line 405 of file RoboticArm.h.

Referenced by HCost(), and SetupGoal().


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