diff --git a/GRT/DataStructures/VectorFloat.cpp b/GRT/DataStructures/VectorFloat.cpp index a2fedcfb..ce9b8794 100644 --- a/GRT/DataStructures/VectorFloat.cpp +++ b/GRT/DataStructures/VectorFloat.cpp @@ -40,6 +40,13 @@ VectorFloat::VectorFloat(const size_type size, const Float &value){ errorLog.setKey("[ERROR VectorFloat]"); resize(size, value); } + +VectorFloat::VectorFloat(const std::vector& values){ + warningLog.setKey("[WARNING VectorFloat]"); + errorLog.setKey("[ERROR VectorFloat]"); + *this = Vector(values); +} + VectorFloat::VectorFloat(const VectorFloat &rhs):Vector(rhs){ warningLog.setKey("[WARNING VectorFloat]"); diff --git a/GRT/DataStructures/VectorFloat.h b/GRT/DataStructures/VectorFloat.h index 526beb1d..63722b92 100644 --- a/GRT/DataStructures/VectorFloat.h +++ b/GRT/DataStructures/VectorFloat.h @@ -52,6 +52,13 @@ class VectorFloat : public Vector< Float >{ */ GRT_API VectorFloat( const std::vector::size_type size, const Float &value ); + /** + Constructor, initializes the VectorFloat from a std::vector + + @param value: the values that will be written to all elements in the vector + */ + GRT_API VectorFloat( const std::vector& values ); + /** Copy Constructor, copies the values from the rhs VectorFloat to this VectorFloat instance