source: git/factory/int_cf.cc @ 8d1432e

spielwiese
Last change on this file since 8d1432e was b52d27, checked in by Martin Lee <martinlee84@…>, 10 years ago
chg: more docu changes
  • Property mode set to 100644
File size: 4.6 KB
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2
3
4#include "config.h"
5
6
7#include "cf_assert.h"
8
9#include "cf_defs.h"
10#include "int_cf.h"
11#include "canonicalform.h"
12#include "cf_factory.h"
13
14/** bool InternalCF::isOne, isZero () const
15 * @sa CanonicalForm::isOne(), CanonicalForm::isZero()
16**/
17bool
18InternalCF::isOne () const
19{
20    return false;
21}
22
23bool
24InternalCF::isZero () const
25{
26    return false;
27}
28
29
30/** CanonicalForm InternalCF::lc (), Lc (), LC ()
31 *  @sa CanonicalForm::lc(), Lc(), LC()
32**/
33CanonicalForm
34InternalCF::lc ()
35{
36    return CanonicalForm( copyObject() );
37}
38
39CanonicalForm
40InternalCF::Lc ()
41{
42    return CanonicalForm( copyObject() );
43}
44
45CanonicalForm
46InternalCF::LC ()
47{
48    return CanonicalForm( copyObject() );
49}
50
51/** int InternalCF::degree ()
52 * @sa CanonicalForm::degree()
53**/
54int
55InternalCF::degree ()
56{
57    if ( isZero() )
58        return -1;
59    else
60        return 0;
61}
62
63/** CanonicalForm InternalCF::tailcoeff (), int InternalCF::taildegree ()
64 * @sa CanonicalForm::tailcoeff(), taildegree()
65**/
66CanonicalForm
67InternalCF::tailcoeff ()
68{
69    return CanonicalForm( copyObject() );
70}
71
72int
73InternalCF::taildegree ()
74{
75    if ( isZero() )
76        return -1;
77    else
78        return 0;
79}
80
81/** InternalCF * InternalCF::num (), den ()
82 * @sa CanonicalForm::num(), den()
83**/
84InternalCF *
85InternalCF::num ()
86{
87    return copyObject();
88}
89
90InternalCF *
91InternalCF::den ()
92{
93    return CFFactory::basic( 1L );
94}
95
96/** InternalCF * InternalCF::sqrt ()
97 * @sa CanonicalForm::sqrt()
98**/
99InternalCF *
100InternalCF::sqrt ()
101{
102    ASSERT1( 0, "sqrt() not implemented for class %s", this->classname() );
103    return 0;
104}
105
106/** int InternalCF::ilog2 ()
107 * @sa CanonicalForm::ilog2()
108**/
109int
110InternalCF::ilog2 ()
111{
112    ASSERT1( 0, "ilog2() not implemented for class %s", this->classname() );
113    return 0;
114}
115
116/** CanonicalForm InternalCF::coeff ( int i )
117 * @sa CanonicalForm::operator []()
118**/
119CanonicalForm
120InternalCF::coeff ( int i )
121{
122    if ( i == 0 )
123        return CanonicalForm( copyObject() );
124    else
125        return CanonicalForm( 0 );
126}
127
128/** InternalCF * InternalCF::bgcdsame, bgcdcoeff ( const InternalCF * const )
129 * @sa CanonicalForm::bgcd()
130**/
131InternalCF *
132InternalCF::bgcdsame ( const InternalCF * const ) const
133{
134    ASSERT1( 0, "bgcd() not implemented for class %s", this->classname() );
135    return CFFactory::basic( 0L );
136}
137
138InternalCF *
139InternalCF::bgcdcoeff ( const InternalCF * const )
140{
141    ASSERT1( 0, "bgcd() not implemented for class %s", this->classname() );
142    return CFFactory::basic( 0L );
143}
144
145/** InternalCF * InternalCF::bextgcdsame ( InternalCF *, CanonicalForm & a, CanonicalForm & b )
146 * @sa CanonicalForm::bextgcd()
147**/
148InternalCF *
149InternalCF::bextgcdsame ( InternalCF *, CanonicalForm & a, CanonicalForm & b )
150{
151    ASSERT1( 0, "bextgcd() not implemented for class %s", this->classname() );
152    a = 0; b = 0;
153    return CFFactory::basic( 0L );
154}
155
156InternalCF *
157InternalCF::bextgcdcoeff ( InternalCF *, CanonicalForm & a, CanonicalForm & b )
158{
159    ASSERT1( 0, "bextgcd() not implemented for class %s", this->classname() );
160    a = 0; b = 0;
161    return CFFactory::basic( 0L );
162}
163
164long
165InternalCF::intval() const
166{
167    ASSERT1( 0, "intval() not implemented for class %s", this->classname() );
168    return 0;
169}
170
171InternalCF*
172InternalCF::invert()
173{
174    ASSERT1( 0, "invert() not implemented for class %s", this->classname() );
175    return 0;
176}
177
178InternalCF*
179InternalCF::tryMulsame( InternalCF*, const CanonicalForm&)
180{
181    ASSERT1( 0, "tryMulsame() not implemented for class %s", this->classname() );
182    return 0;
183}
184
185InternalCF*
186InternalCF::tryInvert ( const CanonicalForm&, bool&)
187{
188    ASSERT1( 0, "tryInvert() not implemented for class %s", this->classname() );
189    return 0;
190}
191
192bool
193InternalCF::tryDivremsamet ( InternalCF*, InternalCF*&, InternalCF*&, const CanonicalForm&, bool&)
194{
195    ASSERT1( 0, "tryDivremsamet() not implemented for class %s", this->classname() );
196    return 0;
197}
198
199bool
200InternalCF::tryDivremcoefft ( InternalCF*, InternalCF*&, InternalCF*&, bool, const CanonicalForm&, bool&)
201{
202    ASSERT1( 0, "tryDivremcoefft() not implemented for class %s", this->classname() );
203    return 0;
204}
205
206InternalCF*
207InternalCF::tryDivsame ( InternalCF*, const CanonicalForm&, bool&)
208{
209    ASSERT1( 0, "tryDivsame() not implemented for class %s", this->classname() );
210    return 0;
211}
212
213InternalCF*
214InternalCF::tryDivcoeff ( InternalCF*, bool, const CanonicalForm&, bool&)
215{
216    ASSERT1( 0, "tryDivcoeff() not implemented for class %s", this->classname() );
217    return 0;
218}
219
220InternalCF*
221InternalCF::tryDividecoeff ( InternalCF*, bool, const CanonicalForm&, bool&)
222{
223    ASSERT1( 0, "tryDividecoeff() not implemented for class %s", this->classname() );
224    return 0;
225}
Note: See TracBrowser for help on using the repository browser.