MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / SingletonVector

Class SingletonVector

Externals/eigen/Eigen/src/SparseCore/SparseMatrix.h:817–828  ·  view source on GitHub ↗

\internal * A vector object that is equal to 0 everywhere but v at the position i */

Source from the content-addressed store, hash-verified

815 /** \internal
816 * A vector object that is equal to 0 everywhere but v at the position i */
817 class SingletonVector
818 {
819 Index m_index;
820 Index m_value;
821 public:
822 typedef Index value_type;
823 SingletonVector(Index i, Index v)
824 : m_index(i), m_value(v)
825 {}
826
827 Index operator[](Index i) const { return i==m_index ? m_value : 0; }
828 };
829
830 /** \internal
831 * \sa insert(Index,Index) */

Callers 1

SparseMatrix.hFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected