NeuralEngine A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes. |

Public Member Functions | Private Member Functions | Private Attributes | List of all members
NeuralEngine::Array2< T > Class Template Reference

The Array2 class represents a 2-dimensional array that minimizes the number of new and delete calls. The T objects are stored in a contiguous array. More...

`#include <NeArray2.h>`

Collaboration diagram for NeuralEngine::Array2< T >:
[legend]

## Public Member Functions
| Array2 (size_t bound0, size_t bound1)
| Constructor. More...
| Array2 (size_t bound0, size_t bound1, T *objects)
| Constructor. More...
| Array2 ()
| Default constructor. More...
| Array2 (Array2 const &other)
Array2 & | operator= (Array2 const &other)
| Array2 (Array2 &&other)
Array2 & | operator= (Array2 &&other)
size_t | GetBound0 () const
size_t | GetBound1 () const
T const * | operator[] (int row) const
T * | operator[] (int row)

## Private Member Functions
void | SetPointers (T *objects)
void | SetPointers (Array2 const &other)

## Private Attributes
size_t | mBound0
size_t | mBound1
std::vector< T > | mObjects
std::vector< T * > | mIndirect1

## Detailed Description

template<typename T>
class NeuralEngine::Array2< T >

The Array2 class represents a 2-dimensional array that minimizes the number of new and delete calls. The T objects are stored in a contiguous array.

Hmetal T, 04.08.2016.

Definition at line 30 of file NeArray2.h.

## Constructor & Destructor Documentation

## ◆ Array2() [1/5]

template<typename T >

Array2::Array2 | ( | size_t | bound0,
|  | size_t | bound1
| ) |  |

Constructor.

<note> Construction. The first constructor generates an array of objects that are owned by Array2.
</note>

Hmetal T, 04.08.2016.

Parameters

  bound0 | The bound 0.
  bound1 | The first bound.

File: NECore/DataTypes/NeArray2.inl

Author:
Email:
Site:

Copyright (c) 2016 . All rights reserved.

Definition at line 12 of file NeArray2.inl.

## ◆ Array2() [2/5]

template<typename T >

Array2::Array2 | ( | size_t | bound0,
|  | size_t | bound1,
|  | T * | objects
| ) |  |

Constructor.

<note> The second constructor is given an array of objects that are owned by the caller. The array has bound0 columns and bound1 rows. </note>

Hmetal T, 04.08.2016.

Parameters

  bound0 | The bound 0.
  bound1 | The first bound.
  objects | [in,out] If non-null, the objects.

Definition at line 23 of file NeArray2.inl.

## ◆ Array2() [3/5]

template<typename T >

Array2::Array2 | ( |  | ) |

Default constructor.

<note> Support for dynamic resizing, copying, or moving. If 'other' does not own the original 'objects', they are not copied by the assignment operator. </note>

Hmetal T, 04.08.2016.

Definition at line 33 of file NeArray2.inl.

## ◆ Array2() [4/5]

template<typename T >

Array2::Array2 | ( | Array2< T > const & | other | ) |

Definition at line 41 of file NeArray2.inl.

## ◆ Array2() [5/5]

template<typename T >

Array2::Array2 | ( | Array2< T > && | other | ) |

Definition at line 56 of file NeArray2.inl.

## Member Function Documentation

## ◆ operator=() [1/2]

template<typename T >

Array2< T > & Array2::operator= | ( | Array2< T > const & | other | ) |

Definition at line 47 of file NeArray2.inl.

## ◆ operator=() [2/2]

template<typename T >

Array2< T > & Array2::operator= | ( | Array2< T > && | other | ) |

Definition at line 62 of file NeArray2.inl.

## ◆ GetBound0()

template<typename T >

size_t Array2::GetBound0 | ( |  | ) | const
| inline

Definition at line 71 of file NeArray2.inl.

## ◆ GetBound1()

template<typename T >

size_t Array2::GetBound1 | ( |  | ) | const
| inline

Definition at line 77 of file NeArray2.inl.

## ◆ operator[]() [1/2]

template<typename T >

T const * Array2::operator[] | ( | int | row | ) | const
| inline

Definition at line 83 of file NeArray2.inl.

## ◆ operator[]() [2/2]

template<typename T >

T * Array2::operator[] | ( | int | row | ) |
| inline

Definition at line 89 of file NeArray2.inl.

## ◆ SetPointers() [1/2]

template<typename T >

void Array2::SetPointers | ( | T * | objects | ) |
| private

Definition at line 95 of file NeArray2.inl.

## ◆ SetPointers() [2/2]

template<typename T >

void Array2::SetPointers | ( | Array2< T > const & | other | ) |
| private

Definition at line 105 of file NeArray2.inl.

## Member Data Documentation

## ◆ mBound0

template<typename T >

size_t NeuralEngine::Array2< T >::mBound0
| private

Definition at line 97 of file NeArray2.h.

## ◆ mBound1

template<typename T >

size_t NeuralEngine::Array2< T >::mBound1
| private

Definition at line 97 of file NeArray2.h.

## ◆ mObjects

template<typename T >

std::vector<T> NeuralEngine::Array2< T >::mObjects
| private

Definition at line 98 of file NeArray2.h.

## ◆ mIndirect1

template<typename T >

std::vector<T*> NeuralEngine::Array2< T >::mIndirect1
| private

Definition at line 99 of file NeArray2.h.

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

- NeArray2.h
- NeArray2.inl