The class C_MemoryData keeps the references to data that is associated with C_Memory. This class implements the functions necessary to retrieve the data by de-referencing the data associated with C_Memory. More...
Public Member Functions | |
C_MemoryData () | |
std::map< std::string, std::deque< float_t > > | dereference_priorities () const |
std::map< std::string, std::deque< int64_t > > | dereference_terminal_state_indices () const |
std::map< std::string, std::deque< torch::Tensor > > | dereference_transition_information () |
void | set_priorities_reference (std::deque< float_t > *&prioritiesFloatReference) |
void | set_terminal_state_indices_reference (std::deque< int64_t > *&terminalStateIndicesReference) |
void | set_transition_information_references (std::deque< torch::Tensor > *&statesCurrent, std::deque< torch::Tensor > *&statesNext, std::deque< torch::Tensor > *&rewards, std::deque< torch::Tensor > *&actions, std::deque< torch::Tensor > *&dones, std::deque< torch::Tensor > *&priorities, std::deque< torch::Tensor > *&probabilities, std::deque< torch::Tensor > *&weights) |
void | set_transition_information_references (std::string &key, std::deque< torch::Tensor > *&reference) |
~C_MemoryData () | |
Private Attributes | |
std::deque< float_t > * | prioritiesFloatReference_ = nullptr |
The reference to deque that stores priorities float; C_Memory::prioritiesFloat_. More... | |
std::deque< int64_t > * | terminalIndicesReference_ = nullptr |
The reference to deque that stores terminal state indices; C_Memory::terminalStateIndices_. More... | |
std::map< std::string, std::deque< torch::Tensor > * > | transitionInformationReference_ |
The class C_MemoryData keeps the references to data that is associated with C_Memory. This class implements the functions necessary to retrieve the data by de-referencing the data associated with C_Memory.
|
default |
The default constructor for C_Memory::C_MemoryData
|
default |
The default destructor for C_Memory::C_MemoryData
std::map< std::string, std::deque< float_t > > C_Memory::C_MemoryData::dereference_priorities | ( | ) | const |
The function to dereference the pointers from C_Memory::C_MemoryData::prioritiesFloatReference_.
priorities
.std::map< std::string, std::deque< int64_t > > C_Memory::C_MemoryData::dereference_terminal_state_indices | ( | ) | const |
The function to dereference the pointers from C_Memory::C_MemoryData::terminalIndicesReference_.
terminal_state_indices
.std::map< std::string, std::deque< torch::Tensor > > C_Memory::C_MemoryData::dereference_transition_information | ( | ) |
The function to dereference the pointers from C_Memory::C_MemoryData::transitionInformationReference_.
void C_Memory::C_MemoryData::set_priorities_reference | ( | std::deque< float_t > *& | prioritiesFloatReference | ) |
Function to set the references to C_Memory::C_MemoryData::prioritiesFloatReference_.
prioritiesFloatReference | The reference to C_Memory:prioritiesFloat_. |
void C_Memory::C_MemoryData::set_terminal_state_indices_reference | ( | std::deque< int64_t > *& | terminalStateIndicesReference | ) |
Function to set the references to C_Memory::C_MemoryData::transitionInformationReference_.
*terminalStateIndicesReference | The reference to C_Memory::terminalStateIndices_. |
void C_Memory::C_MemoryData::set_transition_information_references | ( | std::deque< torch::Tensor > *& | statesCurrent, |
std::deque< torch::Tensor > *& | statesNext, | ||
std::deque< torch::Tensor > *& | rewards, | ||
std::deque< torch::Tensor > *& | actions, | ||
std::deque< torch::Tensor > *& | dones, | ||
std::deque< torch::Tensor > *& | priorities, | ||
std::deque< torch::Tensor > *& | probabilities, | ||
std::deque< torch::Tensor > *& | weights | ||
) |
Function to set the references to C_Memory::C_MemoryData::transitionInformationReference_.
statesCurrent | : The pointer to deque of current states; C_Memory::statesCurrent_. |
statesNext | : The pointer to deque of next states; C_Memory::statesNext_. |
rewards | : The pointer to deque of rewards; C_Memory::rewards_. |
actions | : The pointer to deque of actions; C_Memory::actions. |
dones | : The pointer to deque of dones; C_Memory::dones_. |
priorities | : The pointer to deque of priorities; C_Memory::priorities_. |
probabilities | : The pointer to deque of probabilities; C_Memory::probabilities_. |
weights | : The pointer to deque of weights; C_Memory::weights_. |
void C_Memory::C_MemoryData::set_transition_information_references | ( | std::string & | key, |
std::deque< torch::Tensor > *& | reference | ||
) |
Function to set the references to C_Memory::C_MemoryData::transitionInformationReference_ for a single key.
key | : The key on which reference is to be set. |
*reference | : The reference pointer. |
|
private |
The reference to deque that stores priorities float; C_Memory::prioritiesFloat_.
|
private |
The reference to deque that stores terminal state indices; C_Memory::terminalStateIndices_.
|
private |
The map to store references to each deque that stores each quantity from transitions. This map stores the references to following containers: