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

#include <RoboticArm.h>

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

Public Member Functions

 ArmToTipHeuristic (RoboticArm *r)
 
virtual ~ArmToTipHeuristic ()
 
double HCost (const armAngles &node1, const armAngles &node2) const
 
void GenerateLegalStateTable (armAngles &legalArm)
 
void GenerateTipPositionTables (armAngles &sampleArm)
 
void GenerateRandomHeuristic (const armAngles &sampleArm)
 
int GenerateHeuristic (const armAngles &sampleArm, armAngles &goal)
 
int GenerateMaxDistHeuristics (const armAngles &sampleArm, const int numHeuristics)
 
bool ValidGoalPosition (double goalX, double goalY)
 
- Public Member Functions inherited from RoboticArmHeuristic
virtual ~RoboticArmHeuristic ()
 

Private Member Functions

void GenerateCPDB ()
 
uint64_t ArmAnglesIndex (const armAngles &arm) const
 
uint64_t NumArmAnglesIndices (const armAngles &arm) const
 
int TipPositionIndex (const double x, const double y, const double minX, const double minY, const double width) const
 
int NumTipPositionIndices () const
 
int WriteArmAngles (FILE *file, armAngles &a)
 
int ReadArmAngles (FILE *file, armAngles &a)
 
void UpdateTipDistances (armAngles &arm, uint16_t distance, uint16_t *minTipDistances, uint16_t *maxTipDistances)
 
int GenerateHeuristicSub (const armAngles &sampleArm, const bool quiet, armAngles *goals, const int numGoals, uint16_t *distances, uint16_t *minTipDistances, uint16_t *maxTipDistances, armAngles &lastAdded)
 
uint64_t GenerateNextDepth (FILE *curFile, FILE *nextFile, uint16_t curDistance, uint16_t *distances, uint16_t *minTipDistances, uint16_t *maxTipDistances, armAngles &lastAdded)
 
uint16_t UseHeuristic (const armAngles &s, armAngles &g, uint16_t *distances) const
 
uint16_t UseHeuristic (const armAngles &arm, double goalX, double goalY, uint16_t *distances, uint16_t *minTipDistances, uint16_t *maxTipDistances) const
 

Private Attributes

RoboticArmra
 
bool m_TableComplete
 
uint8_t * legalStateTable
 
uint8_t * legalGoalTable
 
std::vector< uint16_t * > distancesTables
 
std::vector< uint16_t * > minTipDistancesTables
 
std::vector< uint16_t * > maxTipDistancesTables
 
std::vector< uint16_t > tablesNumArms
 
std::vector< armAngles > * tipPositionTables
 

Detailed Description

Definition at line 414 of file RoboticArm.h.

Constructor & Destructor Documentation

◆ ArmToTipHeuristic()

ArmToTipHeuristic::ArmToTipHeuristic ( RoboticArm r)

◆ ~ArmToTipHeuristic()

virtual ArmToTipHeuristic::~ArmToTipHeuristic ( )
inlinevirtual

Definition at line 417 of file RoboticArm.h.

Member Function Documentation

◆ ArmAnglesIndex()

uint64_t ArmToTipHeuristic::ArmAnglesIndex ( const armAngles arm) const
private

◆ GenerateCPDB()

void ArmToTipHeuristic::GenerateCPDB ( )
private

◆ GenerateHeuristic()

int ArmToTipHeuristic::GenerateHeuristic ( const armAngles sampleArm,
armAngles goal 
)

◆ GenerateHeuristicSub()

int ArmToTipHeuristic::GenerateHeuristicSub ( const armAngles sampleArm,
const bool  quiet,
armAngles goals,
const int  numGoals,
uint16_t *  distances,
uint16_t *  minTipDistances,
uint16_t *  maxTipDistances,
armAngles lastAdded 
)
private

◆ GenerateLegalStateTable()

void ArmToTipHeuristic::GenerateLegalStateTable ( armAngles legalArm)

◆ GenerateMaxDistHeuristics()

int ArmToTipHeuristic::GenerateMaxDistHeuristics ( const armAngles sampleArm,
const int  numHeuristics 
)

◆ GenerateNextDepth()

uint64_t ArmToTipHeuristic::GenerateNextDepth ( FILE *  curFile,
FILE *  nextFile,
uint16_t  curDistance,
uint16_t *  distances,
uint16_t *  minTipDistances,
uint16_t *  maxTipDistances,
armAngles lastAdded 
)
private

◆ GenerateRandomHeuristic()

void ArmToTipHeuristic::GenerateRandomHeuristic ( const armAngles sampleArm)

◆ GenerateTipPositionTables()

void ArmToTipHeuristic::GenerateTipPositionTables ( armAngles sampleArm)

◆ HCost()

double ArmToTipHeuristic::HCost ( const armAngles node1,
const armAngles node2 
) const
virtual

◆ NumArmAnglesIndices()

uint64_t ArmToTipHeuristic::NumArmAnglesIndices ( const armAngles arm) const
inlineprivate

◆ NumTipPositionIndices()

int ArmToTipHeuristic::NumTipPositionIndices ( ) const
inlineprivate

◆ ReadArmAngles()

int ArmToTipHeuristic::ReadArmAngles ( FILE *  file,
armAngles a 
)
private

◆ TipPositionIndex()

int ArmToTipHeuristic::TipPositionIndex ( const double  x,
const double  y,
const double  minX,
const double  minY,
const double  width 
) const
private

◆ UpdateTipDistances()

void ArmToTipHeuristic::UpdateTipDistances ( armAngles arm,
uint16_t  distance,
uint16_t *  minTipDistances,
uint16_t *  maxTipDistances 
)
private

◆ UseHeuristic() [1/2]

uint16_t ArmToTipHeuristic::UseHeuristic ( const armAngles arm,
double  goalX,
double  goalY,
uint16_t *  distances,
uint16_t *  minTipDistances,
uint16_t *  maxTipDistances 
) const
private

Definition at line 1035 of file RoboticArm.cpp.

References ArmAnglesIndex(), RoboticArm::GetTolerance(), ra, and TipPositionIndex().

◆ UseHeuristic() [2/2]

uint16_t ArmToTipHeuristic::UseHeuristic ( const armAngles s,
armAngles g,
uint16_t *  distances 
) const
private

Definition at line 1022 of file RoboticArm.cpp.

References ArmAnglesIndex().

Referenced by HCost().

◆ ValidGoalPosition()

bool ArmToTipHeuristic::ValidGoalPosition ( double  goalX,
double  goalY 
)

Definition at line 1076 of file RoboticArm.cpp.

References RoboticArm::GetTolerance(), legalGoalTable, ra, and TipPositionIndex().

◆ WriteArmAngles()

int ArmToTipHeuristic::WriteArmAngles ( FILE *  file,
armAngles a 
)
private

Member Data Documentation

◆ distancesTables

std::vector<uint16_t *> ArmToTipHeuristic::distancesTables
private

◆ legalGoalTable

uint8_t* ArmToTipHeuristic::legalGoalTable
private

Definition at line 439 of file RoboticArm.h.

Referenced by ArmToTipHeuristic(), GenerateLegalStateTable(), and ValidGoalPosition().

◆ legalStateTable

uint8_t* ArmToTipHeuristic::legalStateTable
private

Definition at line 438 of file RoboticArm.h.

Referenced by ArmToTipHeuristic(), and GenerateLegalStateTable().

◆ m_TableComplete

bool ArmToTipHeuristic::m_TableComplete
private

Definition at line 436 of file RoboticArm.h.

Referenced by ArmToTipHeuristic(), and GenerateCPDB().

◆ maxTipDistancesTables

std::vector<uint16_t *> ArmToTipHeuristic::maxTipDistancesTables
private

◆ minTipDistancesTables

std::vector<uint16_t *> ArmToTipHeuristic::minTipDistancesTables
private

◆ ra

RoboticArm* ArmToTipHeuristic::ra
private

◆ tablesNumArms

std::vector<uint16_t> ArmToTipHeuristic::tablesNumArms
private

◆ tipPositionTables

std::vector<armAngles>* ArmToTipHeuristic::tipPositionTables
private

Definition at line 446 of file RoboticArm.h.

Referenced by ArmToTipHeuristic(), and GenerateTipPositionTables().


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