#include <stdio.h>
#include <stdlib.h>
#include <magic/mmath.h>
#include <magic/mmatrix.h>
#include <magic/mstream.h>
#include <magic/mtextstream.h>
#include <magic/mlist.h>
Go to the source code of this file.
Functions | |
BEGIN_NAMESPACE (MagiC) | |
int | solveLinear (const Matrix &mat, const Vector &b, Vector &result) |
int | solveLinear (const Matrix &augmat_orig, Vector &result, int *bv_set) |
Definition in file mmatrix.cc.
|
This file is part of the MagiC++ library. * * Copyright (C) 1998-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
|
|
Solves linear equation represented as an augmented matrix. Uses the Gauss-Jordan method. The solution will be stored in the "result" vector. If the basic variables set nbv_set is given, these variables in the problem are set to be 0, and the linear equation is solved for the remaining, basic variables.
Definition at line 473 of file mmatrix.cc. References Matrix::addRowByScalar(), PackTable< double >::cols, PackTable< double >::get(), PackArray::make(), Matrix::mulRowByScalar(), PackTable< double >::rows, PackArray::size(), and Matrix::swaprows(). Referenced by solveLinear(). |
|
Solves linear equation.
Definition at line 453 of file mmatrix.cc. |