HUMath.Algebra
Class QM

java.lang.Object
  extended by HUMath.Algebra.QM

public class QM
extends java.lang.Object

Matrizen mit Q-Eintraegen

Version:
23.6.2005
Author:
Hubert Grassmann

Field Summary
 int m
           
 Q[][] mat
           
 int n
           
 int[] pivot
           
 int rk
           
 
Constructor Summary
QM(int z, int s)
          Konstrukteur, ergibt eine Matrix mit z Zeilen und s Spalten, (eigentlich z+1, s+1, die 0te Zeile und Spalte bleibt ungenutzt)
 
Method Summary
static QM add(QM a, QM b)
          Matrixaddition
static QM annulator(QM a)
          nach linksGAUSS steht rechts unten der Annulator der Ursprungsmatrix, dieser wird herausgesucht; (dabei hilft die "falsche" Belegung von a.rk)
static QM begleit(QX f)
          Begleitmatrix des Polynoms
static QM cauchy(int n)
          auch eine Cauchy-Matrix
static QM cauchy(Q[] x, Q[] y)
          Cauchy-Matrix: 1 / (x[i-1] + y[j-1])
static QX charPol(QM a)
          das charakteristische Polynom von a wird mit den Newtonschen Formeln berechnet
static int choose(int n, int k)
          Binomialkoeffizient n ber k
static QM copy(QM a)
          kopieren
static Q det(QM aa)
          Determinante
static QM dirSum(QM a, QM b)
          direkte Summe
static QM DM2QM(DM a)
          Umwandlung DM nach QM
static QM faddejew(QM a)
          Inversenberechnung nach Faddejew, d.h.
static int fak(int n)
          Fakult�
static QM fromFile(java.lang.String name)
          liest (m,n)-Matrix aus Datei name; Matrix-Format steht in den ersten 2 Zeilen
static QM GAUSS(QM b)
          Gau�cher Algorithmus
static void Gram_Schmidt(QM a)
          Orthogonalisierung der Spalten von a (wird ueberschrieben)
static QM hilbert(int z)
          quadratische Hilbert-Matrix
static QM hilbert(int z, int s)
          Hilbert-Matrix
static QM inv(QM a)
          Inversenberechnung mittels charPol
static QM invers(QM a)
          inverse Matrix
static QM ivt(QM a)
          die Matrix a soll ganzzahlig sein (die Nenner werden ignoriert); das Ergebnis ist die Diagonalmatrix, die die Invariantenteiler enth�t
static QM JordanBlock(int n, Q z)
          Jordanblock mit n-fachem Eigenwert z
static QM kombi(int n, Q x, Q y)
          kombinatorische Matrix y + delta_ij * x
static QM[] komm(QM a)
          Kommutator-Raum der Matrix a: xa = ax
static void linksGAUSS(QM a, int ende)
          wie Gau�cher Algorithmus; a wird berschrieben; Ende in Spalte ende, a.rk und a.pivot beschreiben nur den LINKEN Teil !
static QM loesung(QM ei)
          es wird die Loesungsmenge des zugehoerigen Gleichungssystems ausgegeben: zuerst eine Basis des Nullraums des homogenen Systems, dann eine spezielle Loesung
static QM LU_lower(QM b)
          LU-Zerlegung, die untere H�fte
static QM LU_upper(QM b)
          LU-Zerlegung, die obere H�fte
static QM matinpol(QM a, QX p)
          die Matrix a wird in das Polynom p eingesetzt
static QM Moore_Penrose(QM a)
          Moore-Penrose-Inverse
static QM mult(QM a, QM b)
          Matrixmultiplikation
static QM nullraum(QM ei)
          die Spalten des Resultats sind eine Basis des Nullraums der Eingabematrix
static Q[] potenzsummen(QM a)
          Potenzsummen der Eigenwerte
static QM power(QM a, int e)
           
static QM pseudoInvers(QM a)
          Pseudoinverse (M�ler?)
static DM QM2DM(QM a)
          Umwandlung QM nach DM
static java.lang.String[] QM2l(QM a)
           
static DM[] qr(QM a)
          QR-Zerlegung; erg[0] ist Q, erg[1] ist R
static QM read(int zeil, int spal)
          lesen
static QM rechts(QM a)
          das rechte Quadrat wird zurckgegeben
static QM rechtseins(QM h)
          eine (zur Zeilenzahl) passende Einheitsmatix wird rechts angefgt
static QM scmult(QM a, Q z)
          die Matrix a wird mit dem Skalar z multipliziert
static Q skalarProd(QM a, int i, int j)
          Skalarprodukt der Spalten i und j von a
static QM spaltenop(QM a, Q z, int z1, int z2)
          das z-fache der z1-ten Spalte wird zur z2-ten addiert
static QM spaltenraum(QM a)
           
static Q spur(QM a)
          Spur
static QM sub(QM a, QM b)
          Matrixsubtraktion
static QM[] symmGauss(QM a)
          symmetrischer Gaussscher Algorithus: a ist eine symmetrische Matrix; d = erg[0] ist eine Diagonalmatrix s = erg[1] ist die Transformationsmatrix mit d = s * a * s^T
 DM toDM()
          Komponenten nach double konvertieren
static void toFile(QM m, java.lang.String name)
          schreibt Matrix m in Datei datei
static QM toQM(DM a)
          Komponenten nach Q konvertieren
static QM transp(QM a)
          transponierte Matrix
static QM unimod(int n, int g, long seed)
          zufällige unimodulare Matrix mit Einträgen bis g, bei seed != 0 reproduzierbar
static QM unitmat(int z)
          Einheitsmatrix
static QM vandermonde(int z)
          quadratische Vandermonde-Matrix
static QM vandermonde(int z, int s)
          Vandermonde-Matrix
static QM vandermonde(Q[] z)
          Vandermonde-Matrix mit zweiter Spalte z
static QM vandermonde(Q[] z, Q[] r)
          Vandermonde-Matrix (n x n+1) mit zweiter Spalte z (die Stellen), letzter Spalte r (den Werten an den Stellen), zur Interpolation p(z[i]) = r[i]
static void write(QM a)
           
static void writeD(QM a)
           
static void writeE(QM a, int emph)
          Schreiben; die Spalte emph wird hervorgehoben
static QM zeilenop(QM a, Q z, int z1, int z2)
          das z-fache der z1-ten Zeile wird zur z2-ten addiert
static boolean zeromat(QM a)
          a = 0 ?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mat

public Q[][] mat

pivot

public int[] pivot

rk

public int rk

m

public int m

n

public int n
Constructor Detail

QM

public QM(int z,
          int s)
Konstrukteur, ergibt eine Matrix mit z Zeilen und s Spalten, (eigentlich z+1, s+1, die 0te Zeile und Spalte bleibt ungenutzt)

Method Detail

DM2QM

public static QM DM2QM(DM a)
Umwandlung DM nach QM


QM2DM

public static DM QM2DM(QM a)
Umwandlung QM nach DM


zeromat

public static boolean zeromat(QM a)
a = 0 ?


unitmat

public static QM unitmat(int z)
Einheitsmatrix


write

public static void write(QM a)

writeE

public static void writeE(QM a,
                          int emph)
Schreiben; die Spalte emph wird hervorgehoben


writeD

public static void writeD(QM a)

QM2l

public static java.lang.String[] QM2l(QM a)

vandermonde

public static QM vandermonde(int z,
                             int s)
Vandermonde-Matrix


vandermonde

public static QM vandermonde(Q[] z)
Vandermonde-Matrix mit zweiter Spalte z


vandermonde

public static QM vandermonde(Q[] z,
                             Q[] r)
Vandermonde-Matrix (n x n+1) mit zweiter Spalte z (die Stellen), letzter Spalte r (den Werten an den Stellen), zur Interpolation p(z[i]) = r[i]


kombi

public static QM kombi(int n,
                       Q x,
                       Q y)
kombinatorische Matrix y + delta_ij * x


hilbert

public static QM hilbert(int z,
                         int s)
Hilbert-Matrix


cauchy

public static QM cauchy(Q[] x,
                        Q[] y)
Cauchy-Matrix: 1 / (x[i-1] + y[j-1])


cauchy

public static QM cauchy(int n)
auch eine Cauchy-Matrix


hilbert

public static QM hilbert(int z)
quadratische Hilbert-Matrix


vandermonde

public static QM vandermonde(int z)
quadratische Vandermonde-Matrix


copy

public static QM copy(QM a)
kopieren


toDM

public DM toDM()
Komponenten nach double konvertieren


toQM

public static QM toQM(DM a)
Komponenten nach Q konvertieren


zeilenop

public static QM zeilenop(QM a,
                          Q z,
                          int z1,
                          int z2)
das z-fache der z1-ten Zeile wird zur z2-ten addiert


spaltenop

public static QM spaltenop(QM a,
                           Q z,
                           int z1,
                           int z2)
das z-fache der z1-ten Spalte wird zur z2-ten addiert


unimod

public static QM unimod(int n,
                        int g,
                        long seed)
zufällige unimodulare Matrix mit Einträgen bis g, bei seed != 0 reproduzierbar


read

public static QM read(int zeil,
                      int spal)
lesen


spur

public static Q spur(QM a)
Spur


transp

public static QM transp(QM a)
transponierte Matrix


rechtseins

public static QM rechtseins(QM h)
eine (zur Zeilenzahl) passende Einheitsmatix wird rechts angefgt


rechts

public static QM rechts(QM a)
das rechte Quadrat wird zurckgegeben


linksGAUSS

public static void linksGAUSS(QM a,
                              int ende)
wie Gau�cher Algorithmus; a wird berschrieben; Ende in Spalte ende, a.rk und a.pivot beschreiben nur den LINKEN Teil !


annulator

public static QM annulator(QM a)
nach linksGAUSS steht rechts unten der Annulator der Ursprungsmatrix, dieser wird herausgesucht; (dabei hilft die "falsche" Belegung von a.rk)


pseudoInvers

public static QM pseudoInvers(QM a)
Pseudoinverse (M�ler?)


mult

public static QM mult(QM a,
                      QM b)
Matrixmultiplikation


power

public static QM power(QM a,
                       int e)

add

public static QM add(QM a,
                     QM b)
Matrixaddition


sub

public static QM sub(QM a,
                     QM b)
Matrixsubtraktion


dirSum

public static QM dirSum(QM a,
                        QM b)
direkte Summe


JordanBlock

public static QM JordanBlock(int n,
                             Q z)
Jordanblock mit n-fachem Eigenwert z


scmult

public static QM scmult(QM a,
                        Q z)
die Matrix a wird mit dem Skalar z multipliziert


matinpol

public static QM matinpol(QM a,
                          QX p)
die Matrix a wird in das Polynom p eingesetzt


LU_lower

public static QM LU_lower(QM b)
LU-Zerlegung, die untere H�fte


LU_upper

public static QM LU_upper(QM b)
LU-Zerlegung, die obere H�fte


GAUSS

public static QM GAUSS(QM b)
Gau�cher Algorithmus


det

public static Q det(QM aa)
Determinante


nullraum

public static QM nullraum(QM ei)
die Spalten des Resultats sind eine Basis des Nullraums der Eingabematrix


loesung

public static QM loesung(QM ei)
es wird die Loesungsmenge des zugehoerigen Gleichungssystems ausgegeben: zuerst eine Basis des Nullraums des homogenen Systems, dann eine spezielle Loesung


Moore_Penrose

public static QM Moore_Penrose(QM a)
Moore-Penrose-Inverse


invers

public static QM invers(QM a)
inverse Matrix


ivt

public static QM ivt(QM a)
die Matrix a soll ganzzahlig sein (die Nenner werden ignoriert); das Ergebnis ist die Diagonalmatrix, die die Invariantenteiler enth�t


fak

public static int fak(int n)
Fakult�


choose

public static int choose(int n,
                         int k)
Binomialkoeffizient n ber k


potenzsummen

public static Q[] potenzsummen(QM a)
Potenzsummen der Eigenwerte


charPol

public static QX charPol(QM a)
das charakteristische Polynom von a wird mit den Newtonschen Formeln berechnet


inv

public static QM inv(QM a)
Inversenberechnung mittels charPol


faddejew

public static QM faddejew(QM a)
Inversenberechnung nach Faddejew, d.h. Horner-Schema


begleit

public static QM begleit(QX f)
Begleitmatrix des Polynoms


toFile

public static void toFile(QM m,
                          java.lang.String name)
schreibt Matrix m in Datei datei


fromFile

public static QM fromFile(java.lang.String name)
liest (m,n)-Matrix aus Datei name; Matrix-Format steht in den ersten 2 Zeilen


komm

public static QM[] komm(QM a)
Kommutator-Raum der Matrix a: xa = ax


spaltenraum

public static QM spaltenraum(QM a)

skalarProd

public static Q skalarProd(QM a,
                           int i,
                           int j)
Skalarprodukt der Spalten i und j von a


Gram_Schmidt

public static void Gram_Schmidt(QM a)
Orthogonalisierung der Spalten von a (wird ueberschrieben)


qr

public static DM[] qr(QM a)
QR-Zerlegung; erg[0] ist Q, erg[1] ist R


symmGauss

public static QM[] symmGauss(QM a)
symmetrischer Gaussscher Algorithus: a ist eine symmetrische Matrix; d = erg[0] ist eine Diagonalmatrix s = erg[1] ist die Transformationsmatrix mit d = s * a * s^T