File: app_multiplymatrix.cpp

package info (click to toggle)
gfan 0.5%2Bdfsg-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,296 kB
  • ctags: 5,612
  • sloc: cpp: 39,675; makefile: 453; sh: 1
file content (35 lines) | stat: -rw-r--r-- 793 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "vektor.h"
#include "printer.h"
#include "parser.h"
#include "gfanapplication.h"

class MultiplyMatrixApplication : public GFanApplication
{
public:
  bool includeInDefaultInstallation() // Not included since the program has no relation to the main programs
  {
    return false;
  }
  MultiplyMatrixApplication()
  {
    registerOptions();
  }
  const char *name()
  {
    return "_multiplymatrix";
  }
  int main()
  {
    FileParser P(Stdin);
    IntegerVectorList a=P.parseIntegerVectorList();
    IntegerVectorList b=P.parseIntegerVectorList();
    AsciiPrinter(Stdout).printVectorList(multiplyIntegerVectorList(a,b));
    return 0;
  }
  const char *helpText()
  {
    return "Takes two matrices and multiplies them.\n";
  }
};

static MultiplyMatrixApplication theApplication;