Macaulay2 Engine
Loading...
Searching...
No Matches

◆ stats()

void gb2_comp::stats ( ) const
virtual

Implements gb_node.

Definition at line 982 of file res-a2-gb.cpp.

983{
984 buffer o;
985 if (M2_gbTrace >= 4 && n_gb > 0)
986 {
987 int nmonoms = 0;
988 int nchange = 0;
989 for (int i = 0; i < gb.size(); i++)
990 {
991 nmonoms += GR->gbvector_n_terms(gb[i]->f);
992 nchange += GR->gbvector_n_terms(gb[i]->fsyz);
993 }
994 o.put(n_gb, 5);
995 o.put(" ");
996 o.put(n_pairs, 5);
997 o.put(" ");
998 o.put(n_pairs_computed, 5);
999 o.put(" ");
1000 o.put(n_pairs_gb, 5);
1001 o.put(" ");
1002 o.put(n_pairs_syz, 5);
1003 o.put(" ");
1004 o.put(n_pairs_zero, 5);
1005 o.put(" ");
1006 o.put(n_pairs_usyz, 5);
1007 o.put(" ");
1008 o.put(n_pairs_hilb, 5);
1009 o.put(" ");
1010 o.put(n_pairs_gcd, 5);
1011 o.put(" ");
1012 o.put(nmonoms, 5);
1013 o.put(" ");
1014 o.put(nchange, 5);
1015 o.put(newline);
1016 emit(o.str());
1017 o.reset();
1018 }
1019
1020 spairs->stats();
1021 if (M2_gbTrace >= 5 && M2_gbTrace % 2 == 1)
1022 {
1023 o << "free module is ";
1024 F->text_out(o);
1025 o << newline;
1026 for (int i = 0; i < gb.size(); i++)
1027 {
1028 o.reset();
1029 o << i << '\t';
1030 GR->gbvector_text_out(o, F, gb[i]->f);
1031 o << newline;
1032 emit(o.str());
1033 }
1034 }
1035 // dfree(F);
1036}
char * str()
Definition buffer.hpp:72
void reset()
Definition buffer.hpp:69
void put(const char *s)
Definition buffer.cpp:35
int n_pairs_computed
Definition res-a2.hpp:147
int n_pairs
Definition res-a2.hpp:146
int n_pairs_syz
Definition res-a2.hpp:149
int n_pairs_gb
Definition res-a2.hpp:151
int n_pairs_zero
Definition res-a2.hpp:152
int n_gb
Definition res-a2.hpp:141
FreeModule * F
Definition res-a2.hpp:120
s_pair_heap * spairs
Definition res-a2.hpp:129
int n_pairs_gcd
Definition res-a2.hpp:154
int n_pairs_usyz
Definition res-a2.hpp:150
int n_pairs_hilb
Definition res-a2.hpp:153
GBRing * GR
Definition res-a2.hpp:114
void gb(IntermediateBasis &F, int n)
char newline[]
Definition m2-types.cpp:49
int M2_gbTrace
Definition m2-types.cpp:52
void emit(const char *s)
Definition text-io.cpp:41

References emit(), F, gb(), GR, M2_gbTrace, n_gb, n_pairs, n_pairs_computed, n_pairs_gb, n_pairs_gcd, n_pairs_hilb, n_pairs_syz, n_pairs_usyz, n_pairs_zero, newline, buffer::put(), buffer::reset(), spairs, and buffer::str().