Added a raw pointer based constructor to MLPPVector.

This commit is contained in:
Relintai 2023-12-26 23:21:33 +01:00
parent 77127594ed
commit 25ce447853
2 changed files with 11 additions and 0 deletions

View File

@ -1457,6 +1457,16 @@ MLPPVector::MLPPVector(const PoolRealArray &p_from) {
}
}
MLPPVector::MLPPVector(const real_t *p_from, const int p_size) {
_size = 0;
_data = NULL;
resize(p_size);
for (int i = 0; i < _size; i++) {
_data[i] = p_from[i];
}
}
MLPPVector::~MLPPVector() {
if (_data) {
reset();

View File

@ -252,6 +252,7 @@ public:
MLPPVector(const MLPPVector &p_from);
MLPPVector(const Vector<real_t> &p_from);
MLPPVector(const PoolRealArray &p_from);
MLPPVector(const real_t *p_from, const int p_size);
~MLPPVector();