My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
kernel
spectrum
semic.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// semic.h
3
// begin of file
4
// Stephan Endrass, endrass@mathematik.uni-mainz.de
5
// 23.7.99
6
// ----------------------------------------------------------------------------
7
8
// ----------------------------------------------------------------------------
9
// here we define a class spectrum to test semicontinuity
10
// ----------------------------------------------------------------------------
11
12
#ifndef SEMIC_H
13
#define SEMIC_H
14
15
#ifdef HAVE_SPECTRUM
16
17
18
#include "
kernel/spectrum/GMPrat.h
"
19
20
typedef
enum
21
{
22
OPEN
,
23
LEFTOPEN
,
24
RIGHTOPEN
,
25
CLOSED
26
27
}
interval_status
;
28
29
/*typedef enum
30
{
31
semicOK,
32
semicMulNegative,
33
34
semicListTooShort,
35
semicListTooLong,
36
37
semicListFirstElementWrongType,
38
semicListSecondElementWrongType,
39
semicListThirdElementWrongType,
40
semicListFourthElementWrongType,
41
semicListFifthElementWrongType,
42
semicListSixthElementWrongType,
43
44
semicListNNegative,
45
semicListWrongNumberOfNumerators,
46
semicListWrongNumberOfDenominators,
47
semicListWrongNumberOfMultiplicities,
48
49
semicListMuNegative,
50
semicListPgNegative,
51
semicListNumNegative,
52
semicListDenNegative,
53
semicListMulNegative,
54
55
semicListNotSymmetric,
56
semicListNotMonotonous,
57
58
semicListMilnorWrong,
59
semicListPGWrong
60
61
} semicState; */
//TODO move to Singular
62
63
class
spectrum
64
{
65
public
:
66
67
int
mu
;
// milnor number
68
int
pg
;
// geometrical genus
69
int
n
;
// # of spectrum numbers
70
Rational
*
s
;
// spectrum numbers
71
int
*
w
;
// multiplicities
72
73
// spectrum( );
74
// spectrum( lists );
75
76
/// Zero constructor
77
spectrum
( )
78
{
79
copy_zero
( );
80
}
81
82
spectrum
(
const
spectrum
& );
83
84
~spectrum
( );
85
86
spectrum
operator =
(
const
spectrum
& );
87
// spectrum operator = ( lists );
88
89
friend
spectrum
operator +
(
const
spectrum
&,
const
spectrum
& );
90
friend
spectrum
operator *
(
int
,
const
spectrum
& );
91
92
#ifdef SEMIC_PRINT
93
friend
ostream &
operator <<
( ostream&,
const
spectrum
& );
94
#endif
/*SEMIC_PRINT*/
95
96
void
copy_new
(
int
);
97
// void copy_delete ( void );
98
99
/// Delete the memory of a spectrum
100
inline
void
copy_delete
(
void
)
101
{
102
if
(
s
!= (
Rational
*)
NULL
&&
n
> 0 )
delete
[]
s
;
103
if
(
w
!= (
int
*)
NULL
&&
n
> 0 )
delete
[]
w
;
104
copy_zero
( );
105
}
106
107
/// Initialize with zero
108
inline
void
copy_zero
(
void
)
109
{
110
mu
= 0;
111
pg
= 0;
112
n
= 0;
113
s
= (
Rational
*)
NULL
;
114
w
= (
int
*)
NULL
;
115
}
116
117
/// Initialize shallow from another spectrum
118
inline
void
copy_shallow
(
spectrum
&spec )
119
{
120
mu
= spec.
mu
;
121
pg
= spec.
pg
;
122
n
= spec.
n
;
123
s
= spec.
s
;
124
w
= spec.
w
;
125
}
126
127
void
copy_deep
(
const
spectrum
& );
128
// void copy_deep ( lists );
129
130
// lists thelist ( void );
131
132
int
add_subspectrum
(
spectrum
&,
int
);
133
int
next_number
(
Rational
* );
134
int
next_interval
(
Rational
*,
Rational
* );
135
int
numbers_in_interval
(
Rational
&,
Rational
&,
interval_status
);
136
int
mult_spectrum
(
spectrum
& );
137
int
mult_spectrumh
(
spectrum
& );
138
139
// int set_milnor ( void );
140
// int set_geometric_genus( void );
141
};
142
143
#endif
/*HAVE_SPECTRUM*/
144
// ----------------------------------------------------------------------------
145
// semic.h
146
// end of file
147
// ----------------------------------------------------------------------------
148
#endif
GMPrat.h
Rational
Definition
GMPrat.h:15
spectrum
Definition
semic.h:64
spectrum::mu
int mu
Definition
semic.h:67
spectrum::spectrum
spectrum()
Zero constructor.
Definition
semic.h:77
spectrum::copy_deep
void copy_deep(const spectrum &)
Definition
semic.cc:103
spectrum::copy_new
void copy_new(int)
Definition
semic.cc:54
spectrum::operator=
spectrum operator=(const spectrum &)
Definition
semic.cc:122
spectrum::s
Rational * s
Definition
semic.h:70
spectrum::add_subspectrum
int add_subspectrum(spectrum &, int)
Definition
semic.cc:279
spectrum::copy_shallow
void copy_shallow(spectrum &spec)
Initialize shallow from another spectrum.
Definition
semic.h:118
spectrum::~spectrum
~spectrum()
Definition
semic.cc:45
spectrum::mult_spectrum
int mult_spectrum(spectrum &)
Definition
semic.cc:396
spectrum::n
int n
Definition
semic.h:69
spectrum::pg
int pg
Definition
semic.h:68
spectrum::next_number
int next_number(Rational *)
Definition
semic.cc:300
spectrum::mult_spectrumh
int mult_spectrumh(spectrum &)
Definition
semic.cc:425
spectrum::copy_delete
void copy_delete(void)
Delete the memory of a spectrum.
Definition
semic.h:100
spectrum::next_interval
int next_interval(Rational *, Rational *)
Definition
semic.cc:325
spectrum::operator*
friend spectrum operator*(int, const spectrum &)
Definition
semic.cc:219
spectrum::w
int * w
Definition
semic.h:71
spectrum::operator<<
friend ostream & operator<<(ostream &, const spectrum &)
Definition
semic.cc:249
spectrum::operator+
friend spectrum operator+(const spectrum &, const spectrum &)
Definition
semic.cc:134
spectrum::copy_zero
void copy_zero(void)
Initialize with zero.
Definition
semic.h:108
spectrum::numbers_in_interval
int numbers_in_interval(Rational &, Rational &, interval_status)
Definition
semic.cc:362
NULL
#define NULL
Definition
omList.c:12
interval_status
interval_status
Definition
semic.h:21
OPEN
@ OPEN
Definition
semic.h:22
RIGHTOPEN
@ RIGHTOPEN
Definition
semic.h:24
CLOSED
@ CLOSED
Definition
semic.h:25
LEFTOPEN
@ LEFTOPEN
Definition
semic.h:23
Generated on
for My Project by
doxygen 1.17.0
for
Singular