mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-12 19:20:36 +08:00
fix a few warnings
This commit is contained in:
parent
37d367a231
commit
c858fb353f
@ -106,6 +106,7 @@ Index cs_tdfs(Index j, Index k, Index *head, const Index *next, Index *post, Ind
|
||||
template<typename Scalar, typename Index>
|
||||
void minimum_degree_ordering(SparseMatrix<Scalar,ColMajor,Index>& C, PermutationMatrix<Dynamic,Dynamic,Index>& perm)
|
||||
{
|
||||
using std::sqrt;
|
||||
typedef SparseMatrix<Scalar,ColMajor,Index> CCS;
|
||||
|
||||
int d, dk, dext, lemax = 0, e, elenk, eln, i, j, k, k1,
|
||||
@ -114,7 +115,7 @@ void minimum_degree_ordering(SparseMatrix<Scalar,ColMajor,Index>& C, Permutation
|
||||
unsigned int h;
|
||||
|
||||
Index n = C.cols();
|
||||
dense = std::max<Index> (16, 10 * sqrt ((double) n)); /* find dense threshold */
|
||||
dense = std::max<Index> (16, Index(10 * sqrt(double(n)))); /* find dense threshold */
|
||||
dense = std::min<Index> (n-2, dense);
|
||||
|
||||
Index cnz = C.nonZeros();
|
||||
|
@ -79,7 +79,7 @@ initSparse(double density,
|
||||
enum { IsRowMajor = SparseMatrix<Scalar,Opt2,Index>::IsRowMajor };
|
||||
sparseMat.setZero();
|
||||
//sparseMat.reserve(int(refMat.rows()*refMat.cols()*density));
|
||||
sparseMat.reserve(VectorXi::Constant(IsRowMajor ? refMat.rows() : refMat.cols(), (1.5*density)*(IsRowMajor?refMat.cols():refMat.rows())));
|
||||
sparseMat.reserve(VectorXi::Constant(IsRowMajor ? refMat.rows() : refMat.cols(), int((1.5*density)*(IsRowMajor?refMat.cols():refMat.rows()))));
|
||||
|
||||
for(int j=0; j<sparseMat.outerSize(); j++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user