summaryrefslogtreecommitdiff
path: root/src/ipa
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa')
-rw-r--r--src/ipa/libipa/vector.cpp8
-rw-r--r--src/ipa/libipa/vector.h5
2 files changed, 12 insertions, 1 deletions
diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp
index 0f0511da..5851b9ae 100644
--- a/src/ipa/libipa/vector.cpp
+++ b/src/ipa/libipa/vector.cpp
@@ -29,7 +29,13 @@ namespace ipa {
/**
* \fn Vector::Vector()
- * \brief Construct a zero vector
+ * \brief Construct an uninitialized vector
+ */
+
+/**
+ * \fn Vector::Vector(T scalar)
+ * \brief Construct a vector filled with a \a scalar value
+ * \param[in] scalar The scalar value
*/
/**
diff --git a/src/ipa/libipa/vector.h b/src/ipa/libipa/vector.h
index 3168835b..5fb7ad7c 100644
--- a/src/ipa/libipa/vector.h
+++ b/src/ipa/libipa/vector.h
@@ -35,6 +35,11 @@ class Vector
public:
constexpr Vector() = default;
+ constexpr explicit Vector(T scalar)
+ {
+ data_.fill(scalar);
+ }
+
constexpr Vector(const std::array<T, Rows> &data)
{
for (unsigned int i = 0; i < Rows; i++)