| 2197 | */ |
| 2198 | template<class ValueType> |
| 2199 | void SetFactorialSequence(std::vector<ValueType> & fact, uint more = 20) |
| 2200 | { |
| 2201 | if( more == 0 ) |
| 2202 | more = 1; |
| 2203 | |
| 2204 | uint start = static_cast<uint>(fact.size()); |
| 2205 | fact.resize(fact.size() + more); |
| 2206 | |
| 2207 | if( start == 0 ) |
| 2208 | { |
| 2209 | fact[0] = 1; |
| 2210 | ++start; |
| 2211 | } |
| 2212 | |
| 2213 | for(uint i=start ; i<fact.size() ; ++i) |
| 2214 | { |
| 2215 | fact[i] = fact[i-1]; |
| 2216 | fact[i].MulInt(i); |
| 2217 | } |
| 2218 | } |
| 2219 | |
| 2220 | |
| 2221 | /*! |
no test coverage detected