ApCoCoA-1:LinBox.Solve

From ApCoCoAWiki
Revision as of 12:04, 29 January 2008 by Skaspar (talk | contribs) (Created first version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Solve

solve linear equation system

Syntax

LinBox.Solve(M:MAT, B:MAT):MAT

Description

This functions tries to solve the linear equation system M*X = B. The return value is of type MAT and non-empty if a solution exists. The computation is done by the ApCoCoAServer and LinBox functions.

Example

Use Z/(19)[x];
M := BringIn(Mat([[1,3,4], [0,2,1]]));
B := BringIn(Mat([[1], [2]]));
LinBox.Solve(M, B);
-- CoCoAServer: computing Cpu Time = 0
-------------------------------
Mat([
  [-2 % 19],
  [1 % 19],
  [0 % 19]
])
-------------------------------
Use Q[x];
M := Mat([ [1,3,4], [0,2,1], [1,3,4] ]);
B := Mat([ [1], [2], [0] ]);
LinBox.Solve(M, B);
-- CoCoAServer: computing Cpu Time = 0
-------------------------------
Mat([
  [ ]
])
-------------------------------

LinKer