// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// return type of SparseCompressedBase::lower_bound; struct LowerBoundIndex {
LowerBoundIndex() : value(-1), found(false) {}
LowerBoundIndex(Index val, bool ok) : value(val), found(ok) {}
Index value; bool found;
};
} // end namespace internal
/** \ingroup SparseCore_Module * * \class Triplet * * \brief A small structure to hold a non zero as a triplet (i,j,value). * * \sa SparseMatrix::setFromTriplets()
*/ template<typename Scalar, typename StorageIndex=typename SparseMatrix<Scalar>::StorageIndex > class Triplet
{ public:
Triplet() : m_row(0), m_col(0), m_value(0) {}
Triplet(const StorageIndex& i, const StorageIndex& j, const Scalar& v = Scalar(0))
: m_row(i), m_col(j), m_value(v)
{}
/** \returns the row index of the element */ const StorageIndex& row() const { return m_row; }
/** \returns the column index of the element */ const StorageIndex& col() const { return m_col; }
/** \returns the value of the element */ const Scalar& value() const { return m_value; } protected:
StorageIndex m_row, m_col;
Scalar m_value;
};
} // end namespace Eigen
#endif// EIGEN_SPARSEUTIL_H
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.