MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / transpose

Function transpose

source/matplot/util/common.cpp:763–771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761 }
762
763 vector_2d transpose(const vector_2d &z) {
764 vector_2d z2(z[0].size(), vector_1d(z.size()));
765 for (size_t i = 0; i < z.size(); ++i) {
766 for (size_t j = 0; j < z[0].size(); ++j) {
767 z2[j][i] = z[i][j];
768 }
769 }
770 return z2;
771 }
772
773 std::vector<std::string> tokenize(std::string_view text,
774 std::string_view delimiters) {

Callers 3

rgbplotMethod · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected