2
* app_matrixproduct.cpp
4
* Created on: Jan 4, 2011
10
#include "gfanapplication.h"
13
class MatrixProductApplication : public GFanApplication
16
SimpleOption optionTropical;
17
bool includeInDefaultInstallation()
21
const char *helpText()
23
return "This program computes the product of two matrices.\n";
25
MatrixProductApplication():
26
optionTropical("--tropical","Do the computation in the max-plus semi-ring.")
33
return "_matrixproduct";
40
IntegerMatrix A=rowsToIntegerMatrix(P.parseIntegerVectorList());
41
IntegerMatrix B=rowsToIntegerMatrix(P.parseIntegerVectorList());
43
pout<<((optionTropical.getValue())?tropicalProduct(A,B):A*B).getRows();
49
static MatrixProductApplication theApplication;