diff options
author | cathook <b01902109@csie.ntu.edu.tw> | 2014-06-24 04:01:53 +0800 |
---|---|---|
committer | cathook <b01902109@csie.ntu.edu.tw> | 2014-06-24 04:01:53 +0800 |
commit | a9955a1a51df2b268da4d28f9ad10dbaf9815634 (patch) | |
tree | 077acbd8e8bf801f517d75b1d5960f883aee5032 /meowpp/math/Vector.h | |
parent | e6f0bcfb63b144da659f28f6f03c51a9b7ae992a (diff) | |
download | meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.gz meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.bz2 meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.lz meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.xz meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.tar.zst meow-a9955a1a51df2b268da4d28f9ad10dbaf9815634.zip |
...
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); } |