@@ -0,0 +1,801 @@
+package cmu.core;%0D%0A%0D%0Apublic class MatOperation %7B%0D%0A%09/**%0D%0A%09 * Generalized matrix multiplication%0D%0A%09 * @param src1%0D%0A%09 * @param src2%0D%0A%09 * @return%0D%0A%09 */%0D%0A%09public static%3CT extends Number%3E Mat%3CT%3E gemm(Mat%3CT%3E src1, Mat%3CT%3E src2) %7B%0D%0A%09%09Mat%3CT%3E result = new Mat%3CT%3E();%0D%0A%09%09return result;%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * Per-element sum of two matrix %0D%0A%09 * @param src1%0D%0A%09 * @param src2%0D%0A%09 * @return%0D%0A%09 */%09%0D%0A%09public static%3CT extends Number%3E Mat%3CT%3E add(Mat%3CT%3E src1, Mat%3CT%3E src2) %7B%0D%0A%09%09%0D%0A%09%7D%0D%0A%09%0D%0A%09/*%0D%0A%09 * Enumerate supported norm operation type%0D%0A%09 */%0D%0A%09private static enum NormType %7BNORM_L1, NORM_L2%7D;%0D%0A%09%0D%0A%09/**%0D%0A%09 * Calculates a matrix norm, norm type is specified by NormType %0D%0A%09 * @param src%0D%0A%09 * @param normType%0D%0A%09 * @return%0D%0A%09 */%0D%0A%09public static %3CT extends Number%3E double norm(Mat%3CT%3E src, NormType normType) %7B%0D%0A%09%09return 0.0;%0D%0A%09%7D%0D%0A%7D%0D%0A

Add matrix operation code template. All methods are static.