MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / Multiply

Method Multiply

src/LNLib/Algorithm/ControlPointsUtils.cpp:61–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61std::vector<std::vector<XYZW>> LNLib::ControlPointsUtils::Multiply(const std::vector<std::vector<XYZW>>& points, const std::vector<std::vector<double>>& coefficient)
62{
63 int m = points.size();
64 int n = points[0].size();
65 int p = coefficient[0].size();
66
67 std::vector<std::vector<XYZW>> result(m, std::vector<XYZW>(p));
68 for (int i = 0; i < m; i++)
69 {
70 for (int j = 0; j < p; j++)
71 {
72 for (int k = 0; k < n; k++)
73 {
74 result[i][j] += points[i][k] * coefficient[k][j];
75 }
76 }
77 }
78 return result;
79}
80
81std::vector<std::vector<XYZW>> LNLib::ControlPointsUtils::Multiply(const std::vector<std::vector<double>>& coefficient, const std::vector<std::vector<XYZW>>& points)
82{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected