mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clean up comments in unsupported module
libeigen/eigen!2198 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -222,16 +222,6 @@ class AutoDiffScalar
|
||||
return AutoDiffScalar<DerType&>(a + b.value(), b.derivatives());
|
||||
}
|
||||
|
||||
// inline const AutoDiffScalar<DerType&> operator+(const Real& other) const
|
||||
// {
|
||||
// return AutoDiffScalar<DerType&>(m_value + other, m_derivatives);
|
||||
// }
|
||||
|
||||
// friend inline const AutoDiffScalar<DerType&> operator+(const Real& a, const AutoDiffScalar& b)
|
||||
// {
|
||||
// return AutoDiffScalar<DerType&>(a + b.value(), b.derivatives());
|
||||
// }
|
||||
|
||||
inline AutoDiffScalar& operator+=(const Scalar& other) {
|
||||
value() += other;
|
||||
return *this;
|
||||
@@ -290,22 +280,6 @@ class AutoDiffScalar
|
||||
return MakeAutoDiffScalar(a.value() * other, a.derivatives() * other);
|
||||
}
|
||||
|
||||
// inline const AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >
|
||||
// operator*(const Real& other) const
|
||||
// {
|
||||
// return AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >(
|
||||
// m_value * other,
|
||||
// (m_derivatives * other));
|
||||
// }
|
||||
//
|
||||
// friend inline const AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >
|
||||
// operator*(const Real& other, const AutoDiffScalar& a)
|
||||
// {
|
||||
// return AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >(
|
||||
// a.value() * other,
|
||||
// a.derivatives() * other);
|
||||
// }
|
||||
|
||||
inline auto operator/(const Scalar& other) const {
|
||||
return MakeAutoDiffScalar(m_value / other, (m_derivatives * (Scalar(1) / other)));
|
||||
}
|
||||
@@ -314,22 +288,6 @@ class AutoDiffScalar
|
||||
return MakeAutoDiffScalar(other / a.value(), a.derivatives() * (Scalar(-other) / (a.value() * a.value())));
|
||||
}
|
||||
|
||||
// inline const AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >
|
||||
// operator/(const Real& other) const
|
||||
// {
|
||||
// return AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >(
|
||||
// m_value / other,
|
||||
// (m_derivatives * (Real(1)/other)));
|
||||
// }
|
||||
//
|
||||
// friend inline const AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >
|
||||
// operator/(const Real& other, const AutoDiffScalar& a)
|
||||
// {
|
||||
// return AutoDiffScalar<typename CwiseUnaryOp<internal::scalar_multiple_op<Real>, DerType>::Type >(
|
||||
// other / a.value(),
|
||||
// a.derivatives() * (-Real(1)/other));
|
||||
// }
|
||||
|
||||
template <typename OtherDerType>
|
||||
inline auto operator/(const AutoDiffScalar<OtherDerType>& other) const {
|
||||
return MakeAutoDiffScalar(m_value / other.value(),
|
||||
@@ -383,16 +341,6 @@ struct auto_diff_special_op<DerivativeType, true>
|
||||
typedef typename traits<DerType>::Scalar Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real Real;
|
||||
|
||||
// typedef auto_diff_scalar_op<DerivativeType, typename NumTraits<Scalar>::Real,
|
||||
// is_same<Scalar,typename NumTraits<Scalar>::Real>::value> Base;
|
||||
|
||||
// using Base::operator+;
|
||||
// using Base::operator+=;
|
||||
// using Base::operator-;
|
||||
// using Base::operator-=;
|
||||
// using Base::operator*;
|
||||
// using Base::operator*=;
|
||||
|
||||
const AutoDiffScalar<DerivativeType>& derived() const {
|
||||
return *static_cast<const AutoDiffScalar<DerivativeType>*>(this);
|
||||
}
|
||||
@@ -448,22 +396,6 @@ struct ScalarBinaryOpTraits<typename DerType::Scalar, AutoDiffScalar<DerType>, B
|
||||
typedef AutoDiffScalar<DerType> ReturnType;
|
||||
};
|
||||
|
||||
// The following is an attempt to let Eigen's known about expression template, but that's more tricky!
|
||||
|
||||
// template<typename DerType, typename BinOp>
|
||||
// struct ScalarBinaryOpTraits<AutoDiffScalar<DerType>,AutoDiffScalar<DerType>, BinOp>
|
||||
// {
|
||||
// enum { Defined = 1 };
|
||||
// typedef AutoDiffScalar<typename DerType::PlainObject> ReturnType;
|
||||
// };
|
||||
//
|
||||
// template<typename DerType1,typename DerType2, typename BinOp>
|
||||
// struct ScalarBinaryOpTraits<AutoDiffScalar<DerType1>,AutoDiffScalar<DerType2>, BinOp>
|
||||
// {
|
||||
// enum { Defined = 1 };//internal::is_same<typename DerType1::Scalar,typename DerType2::Scalar>::value };
|
||||
// typedef AutoDiffScalar<typename DerType1::PlainObject> ReturnType;
|
||||
// };
|
||||
|
||||
#define EIGEN_AUTODIFF_DECLARE_GLOBAL_UNARY(FUNC, CODE) \
|
||||
template <typename DerType> \
|
||||
inline auto FUNC(const Eigen::AutoDiffScalar<DerType>& x) { \
|
||||
|
||||
@@ -35,7 +35,6 @@ namespace Eigen {
|
||||
template <typename ValueType, typename JacobianType>
|
||||
class AutoDiffVector {
|
||||
public:
|
||||
// typedef typename internal::traits<ValueType>::Scalar Scalar;
|
||||
typedef typename internal::traits<ValueType>::Scalar BaseScalar;
|
||||
typedef AutoDiffScalar<Matrix<BaseScalar, JacobianType::RowsAtCompileTime, 1> > ActiveScalar;
|
||||
typedef ActiveScalar Scalar;
|
||||
@@ -57,10 +56,8 @@ class AutoDiffVector {
|
||||
|
||||
Index size() const { return m_values.size(); }
|
||||
|
||||
// FIXME here we could return an expression of the sum
|
||||
Scalar sum() const { /*std::cerr << "sum \n\n";*/ /*std::cerr << m_jacobian.rowwise().sum() << "\n\n";*/
|
||||
return Scalar(m_values.sum(), m_jacobian.rowwise().sum());
|
||||
}
|
||||
// FIXME: Here we could return an expression of the sum.
|
||||
Scalar sum() const { return Scalar(m_values.sum(), m_jacobian.rowwise().sum()); }
|
||||
|
||||
inline AutoDiffVector(const ValueType& values, const JacobianType& jac) : m_values(values), m_jacobian(jac) {}
|
||||
|
||||
@@ -150,23 +147,6 @@ class AutoDiffVector {
|
||||
v.values() * other, v.jacobian() * other);
|
||||
}
|
||||
|
||||
// template<typename OtherValueType,typename OtherJacobianType>
|
||||
// inline const AutoDiffVector<
|
||||
// CwiseBinaryOp<internal::scalar_multiple_op<Scalar>, ValueType, OtherValueType>
|
||||
// CwiseBinaryOp<internal::scalar_sum_op<Scalar>,
|
||||
// CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>,
|
||||
// CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, OtherJacobianType> > >
|
||||
// operator*(const AutoDiffVector<OtherValueType,OtherJacobianType>& other) const
|
||||
// {
|
||||
// return AutoDiffVector<
|
||||
// CwiseBinaryOp<internal::scalar_multiple_op<Scalar>, ValueType, OtherValueType>
|
||||
// CwiseBinaryOp<internal::scalar_sum_op<Scalar>,
|
||||
// CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>,
|
||||
// CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, OtherJacobianType> > >(
|
||||
// m_values.cwise() * other.values(),
|
||||
// (m_jacobian * other.values()) + (m_values * other.jacobian()));
|
||||
// }
|
||||
|
||||
inline AutoDiffVector& operator*=(const Scalar& other) {
|
||||
m_values *= other;
|
||||
m_jacobian *= other;
|
||||
|
||||
@@ -27,8 +27,6 @@ struct OP;
|
||||
template <typename MatrixType, typename MatrixSolver = SimplicialLLT<MatrixType>, bool BisSPD = false>
|
||||
class ArpackGeneralizedSelfAdjointEigenSolver {
|
||||
public:
|
||||
// typedef typename MatrixSolver::MatrixType MatrixType;
|
||||
|
||||
/** \brief Scalar type for matrices of type \p MatrixType. */
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::Index Index;
|
||||
@@ -423,15 +421,6 @@ ArpackGeneralizedSelfAdjointEigenSolver<MatrixType, MatrixSolver, BisSPD>::compu
|
||||
int info = 0;
|
||||
|
||||
Scalar scale = 1.0;
|
||||
// if (!isBempty)
|
||||
//{
|
||||
// Scalar scale = B.norm() / std::sqrt(n);
|
||||
// scale = std::pow(2, std::floor(std::log(scale+1)));
|
||||
////M /= scale;
|
||||
// for (size_t i=0; i<(size_t)B.outerSize(); i++)
|
||||
// for (typename MatrixType::InnerIterator it(B, i); it; ++it)
|
||||
// it.valueRef() /= scale;
|
||||
// }
|
||||
|
||||
MatrixSolver OP;
|
||||
if (mode == 1 || mode == 2) {
|
||||
|
||||
@@ -34,7 +34,7 @@ struct traits<DGMRES<MatrixType_, Preconditioner_> > {
|
||||
* \param ncut Put the ncut smallest elements at the end of the vector
|
||||
* WARNING This is an expensive sort, so should be used only
|
||||
* for small size vectors
|
||||
* TODO Use modified QuickSplit or std::nth_element to get the smallest values
|
||||
* TODO: Use modified QuickSplit or std::nth_element to get the smallest values
|
||||
*/
|
||||
template <typename VectorType, typename IndexType>
|
||||
void sortWithPermutation(VectorType& vec, IndexType& perm, typename IndexType::Scalar& ncut) {
|
||||
@@ -321,7 +321,7 @@ Index DGMRES<MatrixType_, Preconditioner_>::dgmresCycle(const MatrixType& mat, c
|
||||
m_H(it + 1, it) = coef;
|
||||
// m_Hes(it+1,it) = coef;
|
||||
|
||||
// FIXME Check for happy breakdown
|
||||
// FIXME: Check for happy breakdown.
|
||||
|
||||
// Update Hessenberg matrix with Givens rotations
|
||||
for (Index i = 1; i <= it; ++i) {
|
||||
@@ -335,7 +335,6 @@ Index DGMRES<MatrixType_, Preconditioner_>::dgmresCycle(const MatrixType& mat, c
|
||||
|
||||
beta = std::abs(g(it + 1));
|
||||
m_error = beta / normRhs;
|
||||
// std::cerr << nbIts << " Relative Residual Norm " << m_error << std::endl;
|
||||
it++;
|
||||
nbIts++;
|
||||
|
||||
@@ -347,8 +346,7 @@ Index DGMRES<MatrixType_, Preconditioner_>::dgmresCycle(const MatrixType& mat, c
|
||||
}
|
||||
|
||||
// Compute the new coefficients by solving the least square problem
|
||||
// it++;
|
||||
// FIXME Check first if the matrix is singular ... zero diagonal
|
||||
// FIXME: Check first if the matrix is singular (zero diagonal).
|
||||
DenseVector nrs(m_restart);
|
||||
nrs = m_H.topLeftCorner(it, it).template triangularView<Upper>().solve(g.head(it));
|
||||
|
||||
@@ -476,7 +474,7 @@ Index DGMRES<MatrixType_, Preconditioner_>::dgmresComputeDeflationData(const Mat
|
||||
// Factorize m_T into m_luT
|
||||
m_luT.compute(m_T.topLeftCorner(m_r, m_r));
|
||||
|
||||
// FIXME CHeck if the factorization was correctly done (nonsingular matrix)
|
||||
// FIXME: Check if the factorization was correctly done (nonsingular matrix).
|
||||
m_isDeflInitialized = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class IterScaling {
|
||||
/**
|
||||
* Compute the left and right diagonal matrices to scale the input matrix @p mat
|
||||
*
|
||||
* FIXME This algorithm will be modified such that the diagonal elements are permuted on the diagonal.
|
||||
* FIXME: This algorithm will be modified such that the diagonal elements are permuted on the diagonal.
|
||||
*
|
||||
* \sa LeftScaling() RightScaling()
|
||||
*/
|
||||
@@ -164,7 +164,7 @@ class IterScaling {
|
||||
mutable ComputationInfo m_info;
|
||||
bool m_isInitialized;
|
||||
VectorXd m_left; // Left scaling vector
|
||||
VectorXd m_right; // m_right scaling vector
|
||||
VectorXd m_right; // Right scaling vector
|
||||
double m_tol;
|
||||
int m_maxits; // Maximum number of iterations allowed
|
||||
};
|
||||
|
||||
@@ -153,7 +153,7 @@ void KroneckerProductSparse<Lhs, Rhs>::evalTo(Dest& dst) const {
|
||||
|
||||
// compute number of non-zeros per innervectors of dst
|
||||
{
|
||||
// TODO VectorXi is not necessarily big enough!
|
||||
// TODO: VectorXi is not necessarily big enough!
|
||||
VectorXi nnzA = VectorXi::Zero(Dest::IsRowMajor ? m_A.rows() : m_A.cols());
|
||||
for (Index kA = 0; kA < m_A.outerSize(); ++kA)
|
||||
for (LhsInnerIterator itA(lhs1, kA); itA; ++itA) nnzA(Dest::IsRowMajor ? itA.row() : itA.col())++;
|
||||
|
||||
@@ -28,8 +28,6 @@ void lmpar2(const QRSolver &qr, const VectorType &diag, const VectorType &qtb, t
|
||||
using std::sqrt;
|
||||
typedef typename QRSolver::MatrixType MatrixType;
|
||||
typedef typename QRSolver::Scalar Scalar;
|
||||
// typedef typename QRSolver::StorageIndex StorageIndex;
|
||||
|
||||
/* Local variables */
|
||||
Index j;
|
||||
Scalar fp;
|
||||
@@ -55,11 +53,10 @@ void lmpar2(const QRSolver &qr, const VectorType &diag, const VectorType &qtb, t
|
||||
/* compute and store in x the gauss-newton direction. if the */
|
||||
/* jacobian is rank-deficient, obtain a least squares solution. */
|
||||
|
||||
// const Index rank = qr.nonzeroPivots(); // exactly double(0.)
|
||||
const Index rank = qr.rank(); // use a threshold
|
||||
wa1 = qtb;
|
||||
wa1.tail(n - rank).setZero();
|
||||
// FIXME There is no solve in place for sparse triangularView
|
||||
// FIXME: There is no solve-in-place for sparse triangularView.
|
||||
wa1.head(rank) = s.topLeftCorner(rank, rank).template triangularView<Upper>().solve(qtb.head(rank));
|
||||
|
||||
x = qr.colsPermutation() * wa1;
|
||||
|
||||
@@ -265,7 +265,6 @@ LevenbergMarquardtSpace::Status LevenbergMarquardt<FunctorType>::minimize(FVecto
|
||||
return status;
|
||||
}
|
||||
do {
|
||||
// std::cout << " uv " << x.transpose() << "\n";
|
||||
status = minimizeOneStep(x);
|
||||
} while (status == LevenbergMarquardtSpace::Running);
|
||||
m_isInitialized = true;
|
||||
@@ -282,9 +281,8 @@ LevenbergMarquardtSpace::Status LevenbergMarquardt<FunctorType>::minimizeInit(FV
|
||||
m_wa3.resize(n);
|
||||
m_wa4.resize(m);
|
||||
m_fvec.resize(m);
|
||||
// FIXME Sparse Case : Allocate space for the jacobian
|
||||
// FIXME: Sparse case: allocate space for the Jacobian.
|
||||
m_fjac.resize(m, n);
|
||||
// m_fjac.reserve(VectorXi::Constant(n,5)); // FIXME Find a better alternative
|
||||
if (!m_useExternalScaling) m_diag.resize(n);
|
||||
eigen_assert((!m_useExternalScaling || m_diag.size() == n) &&
|
||||
"When m_useExternalScaling is set, the caller must provide a valid 'm_diag'");
|
||||
|
||||
@@ -135,7 +135,7 @@ void matrix_log_compute_pade(MatrixType& result, const MatrixType& T, int degree
|
||||
const int minPadeDegree = 3;
|
||||
const int maxPadeDegree = 11;
|
||||
eigen_assert(degree >= minPadeDegree && degree <= maxPadeDegree);
|
||||
// FIXME this creates float-conversion-warnings if these are enabled.
|
||||
// FIXME: This creates float-conversion warnings if these are enabled.
|
||||
// Either manually convert each value, or disable the warning locally
|
||||
const RealScalar nodes[][maxPadeDegree] = {
|
||||
{0.1127016653792583114820734600217600L, 0.5000000000000000000000000000000000L, // degree 3
|
||||
@@ -257,7 +257,7 @@ void matrix_log_compute_big(const MatrixType& A, MatrixType& result) {
|
||||
}
|
||||
|
||||
matrix_log_compute_pade(result, T, degree);
|
||||
result *= pow(RealScalar(2), RealScalar(numberOfSquareRoots)); // TODO replace by bitshift if possible
|
||||
result *= pow(RealScalar(2), RealScalar(numberOfSquareRoots)); // TODO: Replace by bitshift if possible.
|
||||
}
|
||||
|
||||
/** \ingroup MatrixFunctions_Module
|
||||
|
||||
@@ -31,7 +31,7 @@ class MatrixPower;
|
||||
* MatrixPower::operator() and related functions and most of the
|
||||
* time this is the only way it is used.
|
||||
*/
|
||||
/* TODO This class is only used by MatrixPower, so it should be nested
|
||||
/* TODO: This class is only used by MatrixPower, so it should be nested
|
||||
* into MatrixPower, like MatrixPower::ReturnValue. However, my
|
||||
* compiler complained about unused template parameter in the
|
||||
* following declaration in namespace internal.
|
||||
|
||||
@@ -421,14 +421,14 @@ LevenbergMarquardtSpace::Status LevenbergMarquardt<FunctorType, Scalar>::minimiz
|
||||
permutation.setIdentity(n);
|
||||
if (sing) {
|
||||
wa2 = fjac.colwise().blueNorm();
|
||||
// TODO We have no unit test covering this code path, do not modify
|
||||
// TODO: We have no unit test covering this code path, do not modify
|
||||
// until it is carefully tested
|
||||
ColPivHouseholderQR<JacobianType> qrfac(fjac);
|
||||
fjac = qrfac.matrixQR();
|
||||
wa1 = fjac.diagonal();
|
||||
fjac.diagonal() = qrfac.hCoeffs();
|
||||
permutation = qrfac.colsPermutation();
|
||||
// TODO : avoid this:
|
||||
// TODO: Avoid this:
|
||||
for (Index ii = 0; ii < fjac.cols(); ii++)
|
||||
fjac.col(ii).segment(ii + 1, fjac.rows() - ii - 1) *= fjac(ii, ii); // rescale vectors
|
||||
|
||||
|
||||
@@ -169,7 +169,6 @@ void lmpar2(const ColPivHouseholderQR<Matrix<Scalar, Dynamic, Dynamic> > &qr, co
|
||||
/* compute and store in x the gauss-newton direction. if the */
|
||||
/* jacobian is rank-deficient, obtain a least squares solution. */
|
||||
|
||||
// const Index rank = qr.nonzeroPivots(); // exactly double(0.)
|
||||
const Index rank = qr.rank(); // use a threshold
|
||||
wa1 = qtb;
|
||||
wa1.tail(n - rank).setZero();
|
||||
|
||||
@@ -66,7 +66,7 @@ class NumericalDiff : public Functor_ {
|
||||
const Scalar eps = sqrt(((std::max)(epsfcn, NumTraits<Scalar>::epsilon())));
|
||||
ValueType val1, val2;
|
||||
InputType x = _x;
|
||||
// TODO : we should do this only if the size is not already known
|
||||
// TODO: We should do this only if the size is not already known.
|
||||
val1.resize(Functor::values());
|
||||
val2.resize(Functor::values());
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ class companion {
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef Matrix<Scalar, Deg, 1> RightColumn;
|
||||
// typedef DiagonalMatrix< Scalar, Deg_1, Deg_1 > BottomLeftDiagonal;
|
||||
typedef Matrix<Scalar, Deg_1, 1> BottomLeftDiagonal;
|
||||
|
||||
typedef Matrix<Scalar, Deg, Deg> DenseCompanionMatrixType;
|
||||
|
||||
@@ -551,7 +551,7 @@ class BlockSparseMatrix
|
||||
eigen_assert((m_innerBSize != 0 && m_outerBSize != 0) &&
|
||||
"TRYING TO RESERVE ZERO-SIZE MATRICES, CALL resize() first");
|
||||
|
||||
// FIXME Should free if already allocated
|
||||
// FIXME: Should free if already allocated.
|
||||
m_outerIndex = new StorageIndex[m_outerBSize + 1];
|
||||
|
||||
m_nonzerosblocks = nonzerosblocks;
|
||||
@@ -574,14 +574,14 @@ class BlockSparseMatrix
|
||||
*
|
||||
* \note For fixed-size blocks, call setBlockSize() before this function.
|
||||
*
|
||||
* FIXME Do not accept duplicates
|
||||
* FIXME: Do not accept duplicates.
|
||||
*/
|
||||
template <typename InputIterator>
|
||||
void setFromTriplets(const InputIterator& begin, const InputIterator& end) {
|
||||
eigen_assert((m_innerBSize != 0 && m_outerBSize != 0) && "ZERO BLOCKS, PLEASE CALL resize() before");
|
||||
|
||||
/* First, sort the triplet list
|
||||
* FIXME This can be unnecessarily expensive since only the inner indices have to be sorted
|
||||
* FIXME: This can be unnecessarily expensive since only the inner indices have to be sorted.
|
||||
* The best approach is like in SparseMatrix::setFromTriplets()
|
||||
*/
|
||||
internal::TripletComp<InputIterator, IsColMajor> tripletcomp;
|
||||
@@ -646,49 +646,17 @@ class BlockSparseMatrix
|
||||
}
|
||||
block_id(outer)++;
|
||||
}
|
||||
|
||||
// An alternative when the outer indices are sorted...no need to use an array of markers
|
||||
// for(Index bcol = 0; bcol < m_outerBSize; ++bcol)
|
||||
// {
|
||||
// Index id = 0, id_nz = 0, id_nzblock = 0;
|
||||
// for(InputIterator it(begin); it!=end; ++it)
|
||||
// {
|
||||
// while (id<bcol) // one pass should do the job unless there are empty columns
|
||||
// {
|
||||
// id++;
|
||||
// m_outerIndex[id+1]=m_outerIndex[id];
|
||||
// }
|
||||
// m_outerIndex[id+1] += 1;
|
||||
// m_indices[id_nzblock]=brow;
|
||||
// Index block_size = it->value().rows()*it->value().cols();
|
||||
// m_blockPtr[id_nzblock+1] = m_blockPtr[id_nzblock] + block_size;
|
||||
// id_nzblock++;
|
||||
// memcpy(&(m_values[id_nz]),it->value().data(), block_size*sizeof(Scalar));
|
||||
// id_nz += block_size;
|
||||
// }
|
||||
// while(id < m_outerBSize-1) // Empty columns at the end
|
||||
// {
|
||||
// id++;
|
||||
// m_outerIndex[id+1]=m_outerIndex[id];
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* \returns the number of rows
|
||||
*/
|
||||
inline Index rows() const {
|
||||
// return blockRows();
|
||||
return (IsColMajor ? innerSize() : outerSize());
|
||||
}
|
||||
inline Index rows() const { return (IsColMajor ? innerSize() : outerSize()); }
|
||||
|
||||
/**
|
||||
* \returns the number of cols
|
||||
*/
|
||||
inline Index cols() const {
|
||||
// return blockCols();
|
||||
return (IsColMajor ? outerSize() : innerSize());
|
||||
}
|
||||
inline Index cols() const { return (IsColMajor ? outerSize() : innerSize()); }
|
||||
|
||||
inline Index innerSize() const {
|
||||
if (m_blockSize == Dynamic)
|
||||
@@ -748,7 +716,7 @@ class BlockSparseMatrix
|
||||
if (m_indices[offset] == inner) {
|
||||
return Map<BlockScalar>(&(m_values[blockPtr(offset)]), rsize, csize);
|
||||
} else {
|
||||
// FIXME the block does not exist, Insert it !!!!!!!!!
|
||||
// FIXME: The block does not exist; insert it.
|
||||
eigen_assert("DYNAMIC INSERTION IS NOT YET SUPPORTED");
|
||||
}
|
||||
}
|
||||
@@ -769,7 +737,6 @@ class BlockSparseMatrix
|
||||
if (m_indices[offset] == inner) {
|
||||
return Map<const BlockScalar>(&(m_values[blockPtr(offset)]), rsize, csize);
|
||||
} else
|
||||
// return BlockScalar::Zero(rsize, csize);
|
||||
eigen_assert("NOT YET SUPPORTED");
|
||||
}
|
||||
|
||||
@@ -848,19 +815,9 @@ class BlockSparseMatrix
|
||||
return m_blockPtr[id];
|
||||
else
|
||||
return id * m_blockSize * m_blockSize;
|
||||
// return blockDynIdx(id, std::conditional_t<(BlockSize==Dynamic), internal::true_type, internal::false_type>());
|
||||
}
|
||||
|
||||
protected:
|
||||
// inline Index blockDynIdx(Index id, internal::true_type) const
|
||||
// {
|
||||
// return m_blockPtr[id];
|
||||
// }
|
||||
// inline Index blockDynIdx(Index id, internal::false_type) const
|
||||
// {
|
||||
// return id * BlockSize * BlockSize;
|
||||
// }
|
||||
|
||||
// To be implemented
|
||||
// Insert a block at a particular location... need to make a room for that
|
||||
Map<BlockScalar> insert(Index brow, Index bcol);
|
||||
@@ -905,7 +862,7 @@ class BlockSparseMatrix<Scalar_, _BlockAtCompileTime, Options_, StorageIndex_>::
|
||||
inline Index row() const { return index(); }
|
||||
// block column index
|
||||
inline Index col() const { return outer(); }
|
||||
// FIXME Number of rows in the current block
|
||||
// FIXME: Number of rows in the current block.
|
||||
inline Index rows() const {
|
||||
return (m_mat.m_blockSize == Dynamic) ? (m_mat.m_innerOffset[index() + 1] - m_mat.m_innerOffset[index()])
|
||||
: m_mat.m_blockSize;
|
||||
|
||||
@@ -171,10 +171,7 @@ class MatrixMarketIterator {
|
||||
std::string curfile;
|
||||
curfile = m_folder + "/" + m_curs_id->d_name;
|
||||
// Discard if it is a folder
|
||||
if (m_curs_id->d_type == DT_DIR) continue; // FIXME This may not be available on non BSD systems
|
||||
// struct stat st_buf;
|
||||
// stat (curfile.c_str(), &st_buf);
|
||||
// if (S_ISDIR(st_buf.st_mode)) continue;
|
||||
if (m_curs_id->d_type == DT_DIR) continue; // FIXME: This may not be available on non-BSD systems.
|
||||
|
||||
// Determine from the header if it is a matrix or a right hand side
|
||||
bool isvector, iscomplex = false;
|
||||
|
||||
@@ -1910,8 +1910,6 @@ struct betainc_impl<double> {
|
||||
EIGEN_DEVICE_FUNC static double run(double aa, double bb, double xx) {
|
||||
const double nan = NumTraits<double>::quiet_NaN();
|
||||
const double machep = cephes_helper<double>::machep();
|
||||
// const double maxgam = 171.624376956302725;
|
||||
|
||||
double a, b, t, x, xc, w, y;
|
||||
bool reversed_a_b = false;
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@ void Spline<Scalar_, Dim_, Degree_>::BasisFunctionDerivativesImpl(
|
||||
|
||||
Matrix<Scalar, Order, Order> ndu(p + 1, p + 1);
|
||||
|
||||
Scalar saved, temp; // FIXME These were double instead of Scalar. Was there a reason for that?
|
||||
Scalar saved, temp; // FIXME: These were double instead of Scalar. Was there a reason for that?
|
||||
|
||||
ndu(0, 0) = 1.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user