MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / printToFile

Method printToFile

src/RaceNet/Network.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void Network::printToFile(Matrix<double> &m, std::ofstream &file) {
67 int h = m.getHeight();
68 int w = m.getWidth();
69
70 file << h << std::endl;
71 file << w << std::endl;
72 for (int i = 0; i < h; i++) {
73 for (int j = 0; j < w; j++) {
74 file << m.get(i, j) << (j != w - 1 ? " " : "");
75 }
76 file << std::endl;
77 }
78}
79
80void Network::saveNetworkParams(const char *filepath) {
81 std::ofstream out(filepath);

Callers

nothing calls this directly

Calls 3

getMethod · 0.80
getHeightMethod · 0.45
getWidthMethod · 0.45

Tested by

no test coverage detected