MCPcopy Create free account
hub / github.com/Cantera/cantera / resizeMulti

Function resizeMulti

src/base/SolutionArray.cpp:2106–2115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2104
2105template<class T>
2106void resizeMulti(AnyValue& extra, size_t size, const AnyValue& value)
2107{
2108 vector<T> defaultValue;
2109 if (value.is<void>()) {
2110 defaultValue = vector<T>(extra.matrixShape().second);
2111 } else {
2112 defaultValue = value.as<vector<T>>();
2113 }
2114 extra.asVector<vector<T>>().resize(size, defaultValue);
2115}
2116
2117template<class T>
2118void resetSingle(AnyValue& extra, const vector<int>& slice)

Callers

nothing calls this directly

Calls 2

matrixShapeMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected