Added reserve as suggested by Richard
parent
d34ba9c8bf
commit
156c1abf4e
|
@ -68,6 +68,7 @@ namespace gtsam {
|
||||||
|
|
||||||
// Get dimensions of matrices
|
// Get dimensions of matrices
|
||||||
std::vector<size_t> dimensions;
|
std::vector<size_t> dimensions;
|
||||||
|
dimensions.reserve(terms.size());
|
||||||
for(typename TERMS::const_iterator it = terms.begin(); it != terms.end(); ++it) {
|
for(typename TERMS::const_iterator it = terms.begin(); it != terms.end(); ++it) {
|
||||||
const std::pair<Key, Matrix>& term = *it;
|
const std::pair<Key, Matrix>& term = *it;
|
||||||
const Matrix& Ai = term.second;
|
const Matrix& Ai = term.second;
|
||||||
|
|
Loading…
Reference in New Issue