MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / addPoint

Method addPoint

src/model/TableMultiVariableLookup.cpp:694–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692 }
693
694 bool TableMultiVariableLookup_Impl::addPoint(const std::vector<double>& t_xValues, double t_yValue) {
695 if (t_xValues.size() != (unsigned)numberofIndependentVariables()) {
696 return false;
697 } else if (yValue(t_xValues)) {
698 return false;
699 } else {
700 for (auto it = t_xValues.begin(); it != t_xValues.end(); ++it) {
701 IdfExtensibleGroup eg = getObject<model::TableMultiVariableLookup>().pushExtensibleGroup();
702 eg.setDouble(0, *it);
703 }
704
705 IdfExtensibleGroup eg = getObject<model::TableMultiVariableLookup>().pushExtensibleGroup();
706 eg.setDouble(0, t_yValue);
707 }
708
709 return true;
710 }
711
712 std::vector<TableMultiVariableLookupPoint> TableMultiVariableLookup_Impl::points() const {
713 std::vector<TableMultiVariableLookupPoint> result;

Callers 3

modelToThreeJSMethod · 0.45
boundingBoxMethod · 0.45
TEST_FFunction · 0.45

Calls 7

beginMethod · 0.80
pushExtensibleGroupMethod · 0.80
sizeMethod · 0.45
endMethod · 0.45
setDoubleMethod · 0.45
xMethod · 0.45
yMethod · 0.45

Tested by 1

TEST_FFunction · 0.36