mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Comment cleanup v3: trailing ??, informal language, FIXME/TODO colons
libeigen/eigen!2197 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -173,7 +173,7 @@ Scalar_& AmbiVector<Scalar_, StorageIndex_>::coeffRef(Index i) {
|
||||
return m_buffer[i];
|
||||
else {
|
||||
ListEl* EIGEN_RESTRICT llElements = reinterpret_cast<ListEl*>(m_buffer);
|
||||
// TODO factorize the following code to reduce code generation
|
||||
// TODO: factor out the following code to reduce code generation
|
||||
eigen_assert(m_mode == IsSparse);
|
||||
if (m_llSize == 0) {
|
||||
// this is the first element
|
||||
|
||||
@@ -25,7 +25,7 @@ Derived &SparseMatrixBase<Derived>::operator=(const EigenBase<OtherDerived> &oth
|
||||
template <typename Derived>
|
||||
template <typename OtherDerived>
|
||||
Derived &SparseMatrixBase<Derived>::operator=(const ReturnByValue<OtherDerived> &other) {
|
||||
// TODO use the evaluator mechanism
|
||||
// TODO: use the evaluator mechanism
|
||||
other.evalTo(derived());
|
||||
return derived();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Eigen {
|
||||
// 4 - dense op dense product dense
|
||||
// generic dense
|
||||
//
|
||||
// TODO to ease compiler job, we could specialize product/quotient with a scalar
|
||||
// TODO: to ease compiler job, we could specialize product/quotient with a scalar
|
||||
// and fallback to cwise-unary evaluator using bind1st_op and bind2nd_op.
|
||||
|
||||
template <typename BinaryOp, typename Lhs, typename Rhs>
|
||||
|
||||
@@ -323,8 +323,8 @@ class Ref<const SparseVector<MatScalar, MatOptions, MatIndex>, Options, StrideTy
|
||||
|
||||
namespace internal {
|
||||
|
||||
// FIXME shall we introduce a general evaluatior_ref that we can specialize for any sparse object once, and thus remove
|
||||
// this copy-pasta thing...
|
||||
// FIXME: consider introducing a general evaluator_ref that we can specialize for any sparse object once, and thus
|
||||
// remove this copy-pasta thing...
|
||||
|
||||
template <typename MatScalar, int MatOptions, typename MatIndex, int Options, typename StrideType>
|
||||
struct evaluator<Ref<SparseMatrix<MatScalar, MatOptions, MatIndex>, Options, StrideType>>
|
||||
|
||||
@@ -126,7 +126,7 @@ class SparseSelfAdjointView : public EigenBase<SparseSelfAdjointView<MatrixType,
|
||||
SparseSelfAdjointView& rankUpdate(const SparseMatrixBase<DerivedU>& u, const Scalar& alpha = Scalar(1));
|
||||
|
||||
/** \returns an expression of P H P^-1 */
|
||||
// TODO implement twists in a more evaluator friendly fashion
|
||||
// TODO: implement twists in a more evaluator friendly fashion
|
||||
SparseSymmetricPermutationProduct<MatrixTypeNested_, Mode> twistedBy(
|
||||
const PermutationMatrix<Dynamic, Dynamic, StorageIndex>& perm) const {
|
||||
return SparseSymmetricPermutationProduct<MatrixTypeNested_, Mode>(m_matrix, perm);
|
||||
@@ -205,7 +205,7 @@ SparseSelfAdjointView<MatrixType, Mode>& SparseSelfAdjointView<MatrixType, Mode>
|
||||
|
||||
namespace internal {
|
||||
|
||||
// TODO currently a selfadjoint expression has the form SelfAdjointView<.,.>
|
||||
// TODO: currently a selfadjoint expression has the form SelfAdjointView<.,.>
|
||||
// in the future selfadjoint-ness should be defined by the expression traits
|
||||
// such that Transpose<SelfAdjointView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to
|
||||
// make it work)
|
||||
|
||||
@@ -168,7 +168,7 @@ class SparseVector : public SparseCompressedBase<SparseVector<Scalar_, Options_,
|
||||
|
||||
Index startId = 0;
|
||||
Index p = Index(m_data.size()) - 1;
|
||||
// TODO smart realloc
|
||||
// TODO: implement smart reallocation.
|
||||
m_data.resize(p + 2, 1);
|
||||
|
||||
while ((p >= startId) && (m_data.index(p) > i)) {
|
||||
|
||||
@@ -75,7 +75,7 @@ class SparseView : public SparseMatrixBase<SparseView<MatrixType> > {
|
||||
|
||||
namespace internal {
|
||||
|
||||
// TODO find a way to unify the two following variants
|
||||
// TODO: find a way to unify the two following variants
|
||||
// This is tricky because implementing an inner iterator on top of an IndexBased evaluator is
|
||||
// not easy because the evaluators do not expose the sizes of the underlying expression.
|
||||
|
||||
|
||||
@@ -130,7 +130,8 @@ struct sparse_solve_triangular_selector<Lhs, Rhs, Mode, Upper, ColMajor> {
|
||||
if (!numext::is_exactly_zero(tmp)) // optimization when other is actually sparse
|
||||
{
|
||||
if (!(Mode & UnitDiag)) {
|
||||
// TODO replace this by a binary search. make sure the binary search is safe for partially sorted elements
|
||||
// TODO: replace this with a binary search. make sure the binary search is safe for partially sorted
|
||||
// elements
|
||||
LhsIterator it(lhsEval, i);
|
||||
while (it && it.index() != i) ++it;
|
||||
eigen_assert(it && it.index() == i);
|
||||
|
||||
Reference in New Issue
Block a user