source: git/Singular/fglmvec.h @ b9624d6

fieker-DuValspielwiese
Last change on this file since b9624d6 was b9624d6, checked in by Tim Wichmann <wichmann@…>, 26 years ago
* wichmann: + added HAVE_EXPLICIT_CONSTR support git-svn-id: file:///usr/local/Singular/svn/trunk@2067 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.9 KB
Line 
1// emacs edit mode for this file is -*- C++ -*-
2// $Id: fglmvec.h,v 1.8 1998-06-04 13:39:07 wichmann 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
18class fglmVectorRep;
19
20class fglmVector
21{
22protected:
23    fglmVectorRep * rep;
24    void makeUnique();
25    fglmVector( fglmVectorRep * rep );
26public:
27    fglmVector();
28    fglmVector( int size );
29    fglmVector( int size, int basis );
30    fglmVector( const fglmVector & v );
31    ~fglmVector();
32#ifndef HAVE_EXPLICIT_CONSTR
33    void mac_constr( const fglmVector & v);
34    void mac_constr_i( int size);
35    void clearelems();
36#endif
37    int size() const;
38    int numNonZeroElems() const;
39
40    void nihilate( const number fac1, const number fac2, const fglmVector v );
41    fglmVector & operator = ( const fglmVector & v );
42
43    int operator == ( const fglmVector & );
44    int operator != ( const fglmVector & );
45    int isZero();
46    int elemIsZero( int i );
47
48    fglmVector & operator += ( const fglmVector & );
49    fglmVector & operator -= ( const fglmVector & );
50    fglmVector & operator *= ( const number & );
51    fglmVector & operator /= ( const number & );
52    friend fglmVector operator - ( const fglmVector & v );
53    friend fglmVector operator + ( const fglmVector & lhs, const fglmVector & rhs );
54    friend fglmVector operator - ( const fglmVector & lhs, const fglmVector & rhs );
55    friend fglmVector operator * ( const fglmVector & v, const number n );
56    friend fglmVector operator * ( const number n, const fglmVector & v );
57
58    const number getconstelem( int i ) const;
59    number & getelem( int i );
60    void setelem( int i, number & n );
61
62    number gcd() const;
63    number clearDenom();
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.