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

Method applyFunction

src/RaceNet/Matrix.h:268–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266
267template<class T>
268Matrix<T> Matrix<T>::applyFunction(T (*function)(T)) const {
269 Matrix<T> result(height, width);
270 int i, j;
271
272 for (i = 0; i < height; i++) {
273 for (j = 0; j < width; j++) {
274 result.array[i][j] = (*function)(array[i][j]);
275 }
276 }
277
278 return result;
279}
280
281template<class T>
282Matrix<T> Matrix<T>::subMatrix(int startH, int startW, int h, int w) const {

Callers 3

NetworkMethod · 0.80
computeOutputMethod · 0.80
learnMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected