MCPcopy Create free account
hub / github.com/PX4/eigen / SingletonVector

Class SingletonVector

Eigen/src/SparseCore/SparseMatrix.h:866–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864 /** \internal
865 * A vector object that is equal to 0 everywhere but v at the position i */
866 class SingletonVector
867 {
868 StorageIndex m_index;
869 StorageIndex m_value;
870 public:
871 typedef StorageIndex value_type;
872 SingletonVector(Index i, Index v)
873 : m_index(convert_index(i)), m_value(convert_index(v))
874 {}
875
876 StorageIndex operator[](Index i) const { return i==m_index ? m_value : 0; }
877 };
878
879 /** \internal
880 * \sa insert(Index,Index) */

Callers 1

SparseMatrix.hFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected