Code Search for Developers
 
 
  

debug-RandomMatrix.C from Magnus at Krugle


Show debug-RandomMatrix.C syntax highlighted

// Copyright (C) 1995 The New York Group Theory Cooperative
// See magnus/doc/COPYRIGHT for the full notice.
//
// Contents: Informal tests of class RandomMatrix.
//
// Principal Authors: Dmitry Bormotov
//


#include "RandomMatrix.h"
#include "GaussTransformation.h"


int main( )
{
/*
  srand(1335);
  RandomMatrix<Integer> RM(2);
  for( int i = 0; i < 10; i++ ) {
    Matrix<Integer> M = RM.getRandomMatrix();
    cout << "M = " << M << endl;
    Determinant<Integer> D(M);
    D.startComputation();
    while (!D.done()) D.continueComputation();
    cout << "determinant = " << D.getDeterminant() << endl;
  }
*/

  srand(1335);
  RandomMatrix<Rational> RM(2);
  for( int i = 0; i < 10; i++ ) {
    Matrix<Rational> M = RM.getRandomMatrix();
    cout << "M = " << M << endl;
    Determinant<Rational> D(M);
    D.startComputation();
    while (!D.done()) D.continueComputation();
    cout << "determinant = " << D.getDeterminant() << endl;
  }
}












See more files for this project here

Magnus

Magnus is a special purpose mathematical package for Infinite Group Theory computations

Project homepage: http://sourceforge.net/projects/magnus
Programming language(s): C,C++
License: other

  debug-BTree.C
  debug-GaussTransformation.C
  debug-HomomorphismBuilder.C
  debug-Matrix.C
  debug-Polynomial.C
  debug-RandomMatrix.C
  debug-RationalGT.C
  debug-RationalMatrix.C
  proba.C