# Algorithms_in_C++: machine_learning::aystar_search::AyStarSearch< Puzzle >::Info Struct Reference

Loading...
Searching...
No Matches
machine_learning::aystar_search::AyStarSearch< Puzzle >::Info Struct Reference

Struct that handles all the information related to the current state. More...

Collaboration diagram for machine_learning::aystar_search::AyStarSearch< Puzzle >::Info:
[legend]

## Public Member Functions

| Info ()=default
| stores g score More...
| Info (const Puzzle &A)
| constructor having Puzzle as parameter More...
| Info (const Puzzle &A, size_t h_value, size_t d)
| constructor having three parameters More...
| Info (const Info &A)
| Copy constructor. More...
| Info (const Info &&A) noexcept
| Move constructor. More...
Info & | operator= (const Info &A)
| copy assignment operator More...
Info & | operator= (Info &&A) noexcept
| move assignment operator More...
| ~Info ()=default
| Destructor for Info.

## Public Attributes

std::shared_ptr< Puzzle > | state
size_t | heuristic_value = 0
| Holds the current state.
size_t | depth = 0
| stores h score

## Detailed Description

template<typename Puzzle>
struct machine_learning::aystar_search::AyStarSearch< Puzzle >::Info

Struct that handles all the information related to the current state.

## Constructor & Destructor Documentation

## Info() [1/5]

template<typename Puzzle >

machine_learning::aystar_search::AyStarSearch< Puzzle >::Info::Info | ( |  | ) |

default

stores g score

Default constructor

## Info() [2/5]

template<typename Puzzle >

machine_learning::aystar_search::AyStarSearch< Puzzle >::Info::Info | ( | const Puzzle & | A | ) |

inlineexplicit

constructor having Puzzle as parameter

Parameters

  A | a puzzle object

: state(std::make_shared<Puzzle>(A)) {}

## Info() [3/5]

template<typename Puzzle >

machine_learning::aystar_search::AyStarSearch< Puzzle >::Info::Info | ( | const Puzzle & | A,
|  | size_t | h_value,
|  | size_t | d
| ) |  |

inline

constructor having three parameters

Parameters

  A | a puzzle object
  h_value | heuristic value of this puzzle object
  depth | the depth at which this node was found during traversal

: state(std::make_shared<Puzzle>(A)),
heuristic_value(h_value),
depth(d) {}
machine_learning::aystar_search::AyStarSearch::Info::depth
size_t depth
stores h score
Definition: a_star_search.cpp:296
machine_learning::aystar_search::AyStarSearch::Info::heuristic_value
size_t heuristic_value
Holds the current state.
Definition: a_star_search.cpp:295

## Info() [4/5]

template<typename Puzzle >

machine_learning::aystar_search::AyStarSearch< Puzzle >::Info::Info | ( | const Info & | A | ) |

inline

Copy constructor.

Parameters

  A | Info object reference

: state(std::make_shared<Puzzle>(A.state)),
heuristic_value(A.heuristic_value),
depth(A.depth) {}

## Info() [5/5]

template<typename Puzzle >

machine_learning::aystar_search::AyStarSearch< Puzzle >::Info::Info | ( | const Info && | A | ) |

inlinenoexcept

Move constructor.

Parameters

  A | Info object reference

: state(std::make_shared<Puzzle>(std::move(A.state))),
heuristic_value(std::move(A.heuristic_value)),
depth(std::move(A.depth)) {}
std::move
T move(T... args)

## Member Function Documentation

## operator=() [1/2]

template<typename Puzzle >

Info & machine_learning::aystar_search::AyStarSearch< Puzzle >::Info::operator= | ( | const Info & | A | ) |

inline

copy assignment operator

Parameters

  A | Info object reference

{
state = A.state;
heuristic_value = A.heuristic_value;
depth = A.depth;
return *this;
}

## operator=() [2/2]

template<typename Puzzle >

Info & machine_learning::aystar_search::AyStarSearch< Puzzle >::Info::operator= | ( | Info && | A | ) |

inlinenoexcept

move assignment operator

Parameters

  A | Info object reference

{
state = std::move(A.state);
heuristic_value = std::move(A.heuristic_value);
depth = std::move(A.depth);
return *this;
}
Here is the call graph for this function:

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

- machine_learning/a_star_search.cpp