diff options
Diffstat (limited to 'meowpp/math/Vector.h')
-rw-r--r-- | meowpp/math/Vector.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meowpp/math/Vector.h b/meowpp/math/Vector.h index caa64fd..4dd95a5 100644 --- a/meowpp/math/Vector.h +++ b/meowpp/math/Vector.h @@ -92,7 +92,7 @@ public: } //! @brief Return a \a dimension x 1 matrix form of it - Matrix<Scalar> const& matrix() const { + Matrix<Scalar> matrix() const { return matrix_; } @@ -121,35 +121,35 @@ public: return (dimension() > 0); } - //! @brief return \a i -th entry - Scalar entry(size_t i) const { + //! @brief return \a i -th scalar + Scalar scalar(size_t i) const { return matrix_.entry(i, 0); } /*! - * @brief change \a i -th entry + * @brief change \a i -th scalar * * @param [in] i i-th * @param [in] s new value */ - Scalar entry(size_t i, Scalar const& s) { + Scalar scalar(size_t i, Scalar const& s) { matrix_.entry(i, 0, s); return entry(i); } - - //! @brief return \a i -th entry with non-constant type - ScalarRef entryGet(size_t i) { + + //! @brief return \a i -th scalar with non-constant type + ScalarRef scalarGet(size_t i) { return matrix_.entryGet(i); } /*! - * @brief change \a i -th to \a j -th entries + * @brief change \a i -th to \a j -th scalars * * @param [in] i i-th * @param [in] j j-th * @param [in] s new value */ - void entries(size_t i, size_t j, Scalar const& s) { + void scalars(size_t i, size_t j, Scalar const& s) { for (size_t it = i; it <= j; ++it) { matrix_.entry(it, 0, s); } |