My Project
Loading...
Searching...
No Matches
tgbgauss.h
Go to the documentation of this file.
1#ifndef TGBGAUSS_HEADER
2#define TGBGAUSS_HEADER
3/****************************************
4* Computer Algebra System SINGULAR *
5****************************************/
6/*
7* ABSTRACT: gauss implementation for F4 header
8*/
9#include "coeffs/numbers.h"
11#include "omalloc/omalloc.h"
12#ifdef HAVE_OMALLOC
14#endif
15
16class slimgb_alg;
17
19{
20 private:
21 number** n;
23 int rows;
25 public:
26 tgb_matrix(int i, int j);
28 int get_rows();
29 int get_columns();
30 void print();
31 void perm_rows(int i, int j);
32 void set(int i, int j, number n);
33 number get(int i, int j);
34 BOOLEAN is_zero_entry(int i, int j);
35 void free_row(int row, BOOLEAN free_non_zeros=TRUE);
36 int min_col_not_zero_in_row(int row);
37 int next_col_not_zero(int row,int pre);
38 BOOLEAN zero_row(int row);
39 void mult_row(int row,number factor);
40 void add_lambda_times_row(int add_to,int summand,number factor);
41 int non_zero_entries(int row);
42};
43
45#ifdef HAVE_OMALLOC
46 :public omallocClass
47#endif
48{
49public:
50 number coef;
52 int exp;
54};
55//mac_polys exp are smaller iff they are greater by monomial ordering
56//corresponding to solving linear equations notation
57
59
61{
62 private:
63 ring r;
66 int rows;
68 public:
69 void sort_rows();
70 friend poly free_row_to_poly(tgb_sparse_matrix* mat, int row, poly* monoms, int monom_index);
71 friend void init_with_mac_poly(tgb_sparse_matrix* mat, int row, mac_poly m);
72 tgb_sparse_matrix(int i, int j, ring rarg);
74 int get_rows();
75 int get_columns();
76 void print();
77 void row_normalize(int row);
78 void row_content(int row);
79 // void perm_rows(int i, int j);
80 void perm_rows(int i, int j){
81 mac_poly h;
82 h=mp[i];
83 mp[i]=mp[j];
84 mp[j]=h;
85 }
86 void set(int i, int j, number n);
87 number get(int i, int j);
88 BOOLEAN is_zero_entry(int i, int j);
89 void free_row(int row, BOOLEAN free_non_zeros=TRUE);
90 int min_col_not_zero_in_row(int row);
91 int next_col_not_zero(int row,int pre);
92 BOOLEAN zero_row(int row);
93 void mult_row(int row,number factor);
94 void add_lambda_times_row(int add_to,int summand,number factor);
95 int non_zero_entries(int row);
96};
98void simple_gauss2(tgb_matrix* mat);
99
100
102
103void mac_mult_cons(mac_poly p,number c);
105
106//contrary to delete on the mac_poly_r, the coefficients are also destroyed here
108
109#endif
int BOOLEAN
Definition: auxiliary.h:87
#define TRUE
Definition: auxiliary.h:100
int m
Definition: cfEzgcd.cc:128
int i
Definition: cfEzgcd.cc:132
int p
Definition: cfModGcd.cc:4078
CanonicalForm b
Definition: cfModGcd.cc:4103
FILE * f
Definition: checklibs.c:9
mac_poly_r * next
Definition: tgbgauss.h:51
number coef
Definition: tgbgauss.h:50
int exp
Definition: tgbgauss.h:52
mac_poly_r()
Definition: tgbgauss.h:53
void mult_row(int row, number factor)
Definition: tgbgauss.cc:619
int rows
Definition: tgbgauss.h:23
number ** n
Definition: tgbgauss.h:21
void add_lambda_times_row(int add_to, int summand, number factor)
Definition: tgbgauss.cc:603
void set(int i, int j, number n)
Definition: tgbgauss.cc:520
int min_col_not_zero_in_row(int row)
Definition: tgbgauss.cc:557
int non_zero_entries(int row)
Definition: tgbgauss.cc:590
int next_col_not_zero(int row, int pre)
Definition: tgbgauss.cc:568
BOOLEAN free_numbers
Definition: tgbgauss.h:24
int columns
Definition: tgbgauss.h:22
BOOLEAN zero_row(int row)
Definition: tgbgauss.cc:579
BOOLEAN is_zero_entry(int i, int j)
Definition: tgbgauss.cc:544
void free_row(int row, BOOLEAN free_non_zeros=TRUE)
Definition: tgbgauss.cc:635
void perm_rows(int i, int j)
Definition: tgbgauss.cc:549
number get(int i, int j)
Definition: tgbgauss.cc:537
int get_columns()
Definition: tgbgauss.cc:532
void print()
Definition: tgbgauss.cc:498
int get_rows()
Definition: tgbgauss.cc:527
void set(int i, int j, number n)
Definition: tgbgauss.cc:721
BOOLEAN is_zero_entry(int i, int j)
Definition: tgbgauss.cc:782
int min_col_not_zero_in_row(int row)
Definition: tgbgauss.cc:798
void add_lambda_times_row(int add_to, int summand, number factor)
Definition: tgbgauss.cc:909
BOOLEAN zero_row(int row)
Definition: tgbgauss.cc:822
BOOLEAN free_numbers
Definition: tgbgauss.h:67
mac_poly * mp
Definition: tgbgauss.h:64
void row_normalize(int row)
Definition: tgbgauss.cc:831
void perm_rows(int i, int j)
Definition: tgbgauss.h:80
int next_col_not_zero(int row, int pre)
Definition: tgbgauss.cc:809
int non_zero_entries(int row)
Definition: tgbgauss.cc:903
void mult_row(int row, number factor)
Definition: tgbgauss.cc:914
void row_content(int row)
Definition: tgbgauss.cc:847
number get(int i, int j)
Definition: tgbgauss.cc:766
friend void init_with_mac_poly(tgb_sparse_matrix *mat, int row, mac_poly m)
Definition: tgb.cc:3103
friend poly free_row_to_poly(tgb_sparse_matrix *mat, int row, poly *monoms, int monom_index)
Definition: tgb.cc:3118
void free_row(int row, BOOLEAN free_non_zeros=TRUE)
Definition: tgbgauss.cc:928
CanonicalForm factor
Definition: facAbsFact.cc:97
int j
Definition: facHensel.cc:110
STATIC_VAR Poly * h
Definition: janet.cc:971
#define NULL
Definition: omList.c:12
mac_poly mac_p_add_ff_qq(mac_poly a, number f, mac_poly b)
Definition: tgbgauss.cc:16
void mac_destroy(mac_poly p)
Definition: tgbgauss.cc:113
void simple_gauss(tgb_sparse_matrix *mat, slimgb_alg *c)
Definition: tgbgauss.cc:125
void simple_gauss2(tgb_matrix *mat)
Definition: tgbgauss.cc:365
mac_poly_r * mac_poly
Definition: tgbgauss.h:58
void mac_mult_cons(mac_poly p, number c)
Definition: tgbgauss.cc:91
int mac_length(mac_poly p)
Definition: tgbgauss.cc:102