31 #ifndef EIGEN_SPARSELU_MEMORY
32 #define EIGEN_SPARSELU_MEMORY
44 template<
typename Scalar>
61 template <
typename Scalar,
typename StorageIndex>
62 template <
typename VectorType>
69 if(num_expansions == 0 || keep_prev)
76 old_vec = vec.segment(0,nbElts);
79 #ifdef EIGEN_EXCEPTIONS
85 #ifdef EIGEN_EXCEPTIONS
86 catch(std::bad_alloc& )
110 #ifdef EIGEN_EXCEPTIONS
116 #ifdef EIGEN_EXCEPTIONS
117 catch(std::bad_alloc& )
123 if ( tries > 10)
return new_len;
125 }
while (!vec.size());
130 vec.segment(0, nbElts) = old_vec;
134 if(num_expansions) ++num_expansions;
150 template <
typename Scalar,
typename StorageIndex>
162 Index estimated_size;
163 estimated_size = (5 *
n + 5) *
sizeof(
Index) + tempSpace
165 return estimated_size;
171 glu.
xsup.resize(
n+1);
180 if( (expand<ScalarVector>(glu.
lusup, glu.
nzlumax, 0, 0, num_expansions)<0)
181 || (expand<ScalarVector>(glu.
ucol, glu.
nzumax, 0, 0, num_expansions)<0)
182 || (expand<IndexVector> (glu.
lsub, glu.
nzlmax, 0, 0, num_expansions)<0)
183 || (expand<IndexVector> (glu.
usub, glu.
nzumax, 0, 1, num_expansions)<0) )
191 }
while (!glu.
lusup.size() || !glu.
ucol.size() || !glu.
lsub.size() || !glu.
usub.size());
207 template <
typename Scalar,
typename StorageIndex>
208 template <
typename VectorType>
213 failed_size = this->expand<VectorType>(vec, maxlen, nbElts, 1, num_expansions);
215 failed_size = this->expand<VectorType>(vec, maxlen, nbElts, 0, num_expansions);
226 #endif // EIGEN_SPARSELU_MEMORY