/** * Main program. * * @param array $args Command-line arguments. * @return integer Zero on success; non-zero on failure. */ public static function main($args) { printf("DenseMatrix main program.\n"); $status = 0; $mat = new DenseMatrix(6, 6); AbstractMatrix::test($mat); AbstractMatrix::testTranspose($mat); AbstractMatrix::testTimes($mat, $mat); return $status; }
/** * Main program. * * @param array $args Command-line arguments. * @return integer Zero on success; non-zero on failure. */ public static function main($args) { printf("SparseMatrixAsArray main program.\n"); $status = 0; $mat = new SparseMatrixAsArray(6, 6, 6); AbstractMatrix::test($mat); AbstractMatrix::testTranspose($mat); $mat1 = new SparseMatrixAsArray(3, 3, 3); $mat2 = new SparseMatrixAsArray(3, 3, 3); AbstractMatrix::testTimes($mat1, $mat2); return $status; }