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:
59 List( const List<T>& );
60 List( const T& );
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;
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:
96 ListIterator<T>& operator = ( const ListIterator<T>& );
97 ListIterator<T>& operator = ( const List<T>& );
98 T& getItem() const;
99 int hasItem();
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
int l
Definition cfEzgcd.cc:100
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
ListItem< T > & operator=(const ListItem< T > &)
Definition ftmpl_list.cc:40
ListItem(const ListItem< T > &)
Definition ftmpl_list.cc:6
void print(OSTREAM &)
Definition ftmpl_list.cc:74
ListItem< T > * getPrev()
Definition ftmpl_list.cc:60
void lastItem()
void firstItem()
ListIterator(const List< T > &)
void remove(int moveright)
void operator--(int)
void operator--()
ListIterator(const ListIterator< T > &)
List< CFAFactor > * theList
Definition ftmpl_list.h:89
void append(const T &)
void operator++()
void operator++(int)
T & getItem() const
ListItem< CFAFactor > * current
Definition ftmpl_list.h:90
void insert(const T &)
T getFirst() const
ListItem< CFAFactor > * first
Definition ftmpl_list.h:54
void removeFirst()
void sort(int(*)(const T &, const T &))
int length() const
void append(const T &)
void insert(const T &, int(*cmpf)(const T &, const T &))
T getLast() const
void insert(const T &)
int isEmpty() const
ListItem< CFAFactor > * last
Definition ftmpl_list.h:55
void insert(const T &, int(*cmpf)(const T &, const T &), void(*insf)(T &, const T &))
void print(OSTREAM &) const
List(const T &)
void removeLast()
List(const List< T > &)
Definition ftmpl_list.cc:94
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 > &)
List< T > Union(const List< T > &, const List< T > &)
int operator==(const List< T > &, const List< T > &)
bool find(const List< T > &, const T &t)
OSTREAM & operator<<(OSTREAM &, const List< T > &)
#define FACTORY_PUBLIC
Definition globaldefs.h:25
STATIC_VAR jList * T
Definition janet.cc:30
STATIC_VAR TreeM * G
Definition janet.cc:31