source: git/Singular/fglmvec.h @ 400884

spielwiese
Last change on this file since 400884 was 8bafbf0, checked in by Hans Schönemann <hannes@…>, 27 years ago
* hannes/wichmann: added fglm git-svn-id: file:///usr/local/Singular/svn/trunk@91 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.8 KB
Line 
1// emacs edit mode for this file is -*- C++ -*-
2// $Id: fglmvec.h,v 1.2 1997-03-26 17:07:22 Singular Exp $
3
4/****************************************
5*  Computer Algebra System SINGULAR     *
6****************************************/
7/*
8* ABSTRACT - The FGLM-Algorithm
9*   header file for fglmvec.cc. See fglmvec.cc for details.
10*/
11
12#ifndef FGLMVEC_H
13#define FGLMVEC_H
14
15#include "mod2.h"
16#include "numbers.h"
17#include "fglm.h"
18
19class fglmVectorRep;
20
21class fglmVector
22{
23protected:
24    fglmVectorRep * rep;
25    void makeUnique();
26    fglmVector( fglmVectorRep * rep );
27public:
28    fglmVector();
29    fglmVector( int size );
30    fglmVector( int size, int basis );
31    fglmVector( const fglmVector & v );
32    ~fglmVector();
33    int size() const;
34    int numNonZeroElems() const;
35
36    void nihilate( const number fac1, const number fac2, const fglmVector v );
37    fglmVector & operator = ( const fglmVector & v );
38
39    int operator == ( const fglmVector & );
40    int operator != ( const fglmVector & );
41    int isZero();
42    int elemIsZero( int i );
43
44    fglmVector & operator += ( const fglmVector & );
45    fglmVector & operator -= ( const fglmVector & );
46    fglmVector & operator *= ( const number & );
47    fglmVector & operator /= ( const number & );
48    friend fglmVector operator - ( const fglmVector & v );
49    friend fglmVector operator + ( const fglmVector & lhs, const fglmVector & rhs );
50    friend fglmVector operator - ( const fglmVector & lhs, const fglmVector & rhs );
51    friend fglmVector operator * ( const fglmVector & v, const number n );
52    friend fglmVector operator * ( const number n, const fglmVector & v );
53
54    const number getconstelem( int i ) const;
55    number & getelem( int i );
56    void setelem( int i, number & n );
57
58    number gcd() const;
59    number clearDenom();
60};
61
62#endif
Note: See TracBrowser for help on using the repository browser.