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

Method xValues

src/model/TableMultiVariableLookup.cpp:788–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

786 }
787
788 std::vector<double> TableMultiVariableLookup_Impl::xValues(int xIndex) const {
789 std::vector<double> result;
790
791 if (xIndex >= numberofIndependentVariables()) {
792 return result;
793 }
794
795 std::vector<TableMultiVariableLookupPoint> t_points = points();
796 for (const TableMultiVariableLookupPoint& pt : t_points) {
797 std::vector<double> xValues = pt.x();
798 result.push_back(xValues[xIndex]);
799 }
800
801 std::sort(result.begin(), result.end());
802 result.erase(std::unique(result.begin(), result.end()), result.end());
803
804 return result;
805 }
806
807 boost::optional<double> TableMultiVariableLookup_Impl::yValue(const std::vector<double>& xValues) const {
808 boost::optional<double> result;

Callers 2

TEST_FFunction · 0.80

Calls 5

beginMethod · 0.80
xMethod · 0.45
push_backMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by 1

TEST_FFunction · 0.64