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

Method yValue

src/model/TableMultiVariableLookup.cpp:807–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805 }
806
807 boost::optional<double> TableMultiVariableLookup_Impl::yValue(const std::vector<double>& xValues) const {
808 boost::optional<double> result;
809
810 std::vector<TableMultiVariableLookupPoint> t_points = points();
811 for (const TableMultiVariableLookupPoint& pt : t_points) {
812 std::vector<double> t_c = pt.x();
813 if (xValuesEqual(t_c, xValues)) {
814 result = pt.y();
815 break;
816 }
817 }
818
819 return result;
820 }
821
822 bool TableMultiVariableLookup_Impl::setPoints(const std::vector<TableMultiVariableLookupPoint>& points) {
823 // We first check that ALL points have the right number of independent variables, before we do anything destructive such as clearing the points

Callers 1

TEST_FFunction · 0.80

Calls 2

xMethod · 0.45
yMethod · 0.45

Tested by 1

TEST_FFunction · 0.64