MCPcopy Create free account
hub / github.com/bgrimstad/splinter / linspace

Function linspace

src/utilities.cpp:72–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72std::vector<double> linspace(double start, double stop, unsigned int num)
73{
74 std::vector<double> ret;
75 double dx = 0;
76 if (num > 1)
77 dx = (stop - start)/(num-1);
78 for (unsigned int i = 0; i < num; ++i)
79 ret.push_back(start + i*dx);
80 return ret;
81}
82
83} // namespace SPLINTER

Callers 1

knotVectorEquidistantMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected