NeuralEngine
A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes.
NeArray2.h
1
11
#pragma once
12
13
#include <NeCoreLib.h>
14
#include <cstddef>
15
#include <vector>
16
17
namespace
NeuralEngine
18
{
19
20
template
<
typename
T>
21
30
class
Array2
31
{
32
public
:
33
47
Array2
(
size_t
bound0,
size_t
bound1);
48
64
Array2
(
size_t
bound0,
size_t
bound1, T* objects);
65
66
78
Array2
();
79
Array2
(
Array2
const
& other);
80
Array2
& operator=(
Array2
const
& other);
81
Array2
(
Array2
&& other);
82
Array2
& operator=(
Array2
&& other);
83
84
// Access to the array. Sample usage is
85
// Array2<T> myArray(3, 2);
86
// T* row1 = myArray[1];
87
// T row1Col2 = myArray[1][2];
88
inline
size_t
GetBound0()
const
;
89
inline
size_t
GetBound1()
const
;
90
inline
T
const
* operator[] (
int
row)
const
;
91
inline
T* operator[] (
int
row);
92
93
private
:
94
void
SetPointers(T* objects);
95
void
SetPointers(
Array2
const
& other);
96
97
size_t
mBound0, mBound1;
98
std::vector<T> mObjects;
99
std::vector<T*> mIndirect1;
100
};
101
102
#include "NeArray2.inl"
103
}
NeuralEngine::Array2
The Array2 class represents a 2-dimensional array that minimizes the number of new and delete calls....
Definition:
NeArray2.h:31
NeuralEngine::Array2::Array2
Array2()
Default constructor.
Definition:
NeArray2.inl:33
NeuralEngine
Definition:
NeArray2.h:18
include
Core
NeArray2.h
Generated by
1.9.4