source: git/kernel/fglmvec.h @ f599a46

spielwiese
Last change on this file since f599a46 was 210e07, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: testing headers with "make test.o" FIX: cleaning up headers in kernel: TODO: kutil.h?! FIX: febase.h -> old.febase.h (remove later on) ADD: dummy headers instead of some splited or moved: febase.h, modulop.h (for later fixing) FIX: renamed various obsolette files into "old.*"
  • Property mode set to 100644
File size: 1.8 KB
Line 
1// emacs edit mode for this file is -*- C++ -*-
2// $Id$
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 <coeffs/numbers.h>
16
17class fglmVectorRep;
18
19class fglmVector
20{
21protected:
22    fglmVectorRep * rep;
23    void makeUnique();
24    fglmVector( fglmVectorRep * rep );
25public:
26    fglmVector();
27    fglmVector( int size );
28    fglmVector( int size, int basis );
29    fglmVector( const fglmVector & v );
30    ~fglmVector();
31#ifndef HAVE_EXPLICIT_CONSTR
32    void mac_constr( const fglmVector & v);
33    void mac_constr_i( int size);
34    void clearelems();
35#endif
36    int size() const;
37    int numNonZeroElems() const;
38
39    void nihilate( const number fac1, const number fac2, const fglmVector v );
40    fglmVector & operator = ( const fglmVector & v );
41
42    int operator == ( const fglmVector & );
43    int operator != ( const fglmVector & );
44    int isZero();
45    int elemIsZero( int i );
46
47    fglmVector & operator += ( const fglmVector & );
48    fglmVector & operator -= ( const fglmVector & );
49    fglmVector & operator *= ( const number & );
50    fglmVector & operator /= ( const number & );
51    friend fglmVector operator - ( const fglmVector & v );
52    friend fglmVector operator + ( const fglmVector & lhs, const fglmVector & rhs );
53    friend fglmVector operator - ( const fglmVector & lhs, const fglmVector & rhs );
54    friend fglmVector operator * ( const fglmVector & v, const number n );
55    friend fglmVector operator * ( const number n, const fglmVector & v );
56
57    const number getconstelem( int i ) const;
58    number & getelem( int i );
59    void setelem( int i, number & n );
60
61    number gcd() const;
62    number clearDenom();
63};
64
65#endif
Note: See TracBrowser for help on using the repository browser.