My Project
Loading...
Searching...
No Matches
ftmpl_list.h
Go to the documentation of this file.
1/* emacs edit mode for this file is -*- C++ -*- */
2
3#ifndef INCL_LIST_H
4#define INCL_LIST_H
5
6#ifndef NOSTREAMIO
7#ifdef HAVE_IOSTREAM
8#include <iostream>
9#define OSTREAM std::ostream
10#elif defined(HAVE_IOSTREAM_H)
11#include <iostream.h>
12#define OSTREAM ostream
13#endif
14#endif /* NOSTREAMIO */
15
16template <class T>
17class ListIterator;
18
19template <class T>
20class List;
21
22#ifndef NOSTREAMIO
23template <class T>
25#endif
26
27template <class T>
29{
30private:
34public:
35 ListItem( const ListItem<T>& );
36 ListItem( const T&, ListItem<T>*, ListItem<T>* );
38 ~ListItem();
42 T& getItem();
43#ifndef NOSTREAMIO
44 void print ( OSTREAM& );
45#endif /* NOSTREAMIO */
46 friend class ListIterator<T>;
47 friend class List<T>;
48};
49
50template <class T>
52{
53private:
57public:
58 List();
59 List( const List<T>& );
60 List( const T& );
61 ~List();
62 List<T>& operator= ( const List<T>& );
63 void insert ( const T& );
64 void insert ( const T&, int (*cmpf)( const T&, const T& ) );
65 void insert ( const T&, int (*cmpf)( const T&, const T& ), void (*insf)( T&, const T& ) );
66 void append ( const T& );
67 int isEmpty() const;
68 int length() const;
69 T getFirst() const;
70 void removeFirst();
71 T getLast() const;
72 void removeLast();
73 void sort ( int (*) ( const T&, const T& ) );
74#ifndef NOSTREAMIO
75 void print ( OSTREAM & ) const;
76 friend OSTREAM& operator<< <T>( OSTREAM & os, const List<T> & l );
77#endif /* NOSTREAMIO */
78 friend class ListIterator<T>;
79};
80
81#ifndef NOSTREAMIO
82template <class T>
83OSTREAM& operator<< ( OSTREAM & os, const List<T> & l );
84#endif /* NOSTREAMIO */
85
86template <class T>
88private:
91public:
94 ListIterator( const List<T>& );
96 ListIterator<T>& operator = ( const ListIterator<T>& );
97 ListIterator<T>& operator = ( const List<T>& );
98 T& getItem() const;
99 int hasItem();
100 void operator++();
101 void operator--();
102 void operator++( int );
103 void operator--( int );
104 void firstItem();
105 void lastItem();
106 void insert( const T& );
107 void append( const T& );
108 void remove( int moveright );
109};
110
111template <class T>
112int operator== (const List<T>&, const List<T>& );
113
114template <class T>
115List<T> Union ( const List<T>&, const List<T>& );
116
117template <class T>
118List<T> Difference ( const List<T>&, const List<T>& );
119
120template <class T>
121List<T> Union ( const List<T> &, const List<T> & , int (*ecmpf)( const T&, const T& ));
122
123template <class T>
124List<T> Difference ( const List<T> &, const List<T> & , int (*ecmpf)( const T&, const T& ));
125
126template <class T>
127List<T> Difference ( const List<T> & F, const T & G);
128
129template <class T>
130List<T> Difference ( const List<T> & F, const T & G, int (*ecmpf)( const T&, const T& ));
131
132template <class T>
133List<T> Union ( const List<T>&, const List<T>&, int (*cmpf)( const T&, const T& ), void (*insf)( T&, const T& ) );
134
135template <class T>
136T prod ( const List<T>& );
137
138template <class T>
139bool find (const List<T>&, const T& t);
140
141template <class T>
142bool find (const List<T> & F, const T& t, int (*ecmpf)( const T&, const T& ));
143#endif /* ! INCL_LIST_H */
#define OSTREAM
Definition: canonicalform.h:16
int l
Definition: cfEzgcd.cc:100
static void sort(int **points, int sizePoints)
CanonicalForm getItem(const CFList &list, const int &pos)
helper function
Definition: cf_map_ext.cc:53
ListItem< T > * getNext()
Definition: ftmpl_list.cc:53
T & getItem()
Definition: ftmpl_list.cc:67
ListItem * next
Definition: ftmpl_list.h:31
ListItem * prev
Definition: ftmpl_list.h:32
T * item
Definition: ftmpl_list.h:33
ListItem< T > & operator=(const ListItem< T > &)
Definition: ftmpl_list.cc:40
void print(OSTREAM &)
Definition: ftmpl_list.cc:74
ListItem< T > * getPrev()
Definition: ftmpl_list.cc:60
List< T > * theList
Definition: ftmpl_list.h:89
ListItem< T > * current
Definition: ftmpl_list.h:90
ListItem< T > * first
Definition: ftmpl_list.h:54
int _length
Definition: ftmpl_list.h:56
ListItem< T > * last
Definition: ftmpl_list.h:55
result insert(CFAFactor(LcF, 1, 1))
CFFList append(const CFFList &Inputlist, const CFFactor &TheFactor)
else L getLast()(0
fq_nmod_poly_t prod
Definition: facHensel.cc:100
#define OSTREAM
Definition: ftmpl_list.h:9
List< T > Difference(const List< T > &, const List< T > &)
Definition: ftmpl_list.cc:622
OSTREAM & operator<<(OSTREAM &, const List< T > &)
Definition: ftmpl_list.cc:555
List< T > Union(const List< T > &, const List< T > &)
Definition: ftmpl_list.cc:563
int operator==(const List< T > &, const List< T > &)
Definition: ftmpl_list.cc:176
bool find(const List< T > &, const T &t)
Definition: ftmpl_list.cc:700
#define FACTORY_PUBLIC
Definition: globaldefs.h:25
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:257
STATIC_VAR jList * T
Definition: janet.cc:30
STATIC_VAR TreeM * G
Definition: janet.cc:31