mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare] Context::expressionForSymbol takes a boolean notifying that
we want a copy or not
This commit is contained in:
@@ -9,7 +9,7 @@ using namespace Shared;
|
||||
|
||||
namespace Regression {
|
||||
|
||||
const Expression RegressionContext::expressionForSymbol(const SymbolAbstract & symbol) {
|
||||
const Expression RegressionContext::expressionForSymbol(const SymbolAbstract & symbol, bool clone) {
|
||||
if (symbol.type() == ExpressionNode::Type::Symbol && Symbol::isRegressionSymbol(symbol.name())) {
|
||||
const char * seriesName = symbol.name();
|
||||
assert(strlen(seriesName) == 2);
|
||||
@@ -24,7 +24,7 @@ const Expression RegressionContext::expressionForSymbol(const SymbolAbstract & s
|
||||
assert(m_seriesPairIndex < m_store->numberOfPairsOfSeries(series));
|
||||
return Float<double>(m_store->get(series, storeI, m_seriesPairIndex));
|
||||
} else {
|
||||
return m_parentContext->expressionForSymbol(symbol);
|
||||
return m_parentContext->expressionForSymbol(symbol, clone);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user