CoeffList.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef COEFFLIST_1F7F503B
00004 #define COEFFLIST_1F7F503B
00005 
00006 #if _MSC_VER > 1000
00007 #pragma once
00008 #endif // _MSC_VER > 1000
00009 
00010 #include "typedefs.h"
00011 #include "polynomdefs.h"
00012 #include <iostream>
00013 
00014 
00015 
00016 
00017 namespace nCenterFocus
00018 {
00019 
00029 class CoeffListEntry  
00030 {
00031 public:
00032         P_or_QPolynom  porq; 
00033         CoeffListEntry();
00034 
00035 
00037         CoeffListEntry(P_or_QPolynom p_oder_q, const int yExp, const int currentMonomDegree);
00038 
00039         virtual ~CoeffListEntry();
00040 
00041         int x_exp; 
00042         int y_exp; 
00043 
00044 
00045         bool isPMonom() const   {       return porq==PCoefficient; }
00046         bool isQMonom() const   {       return porq==QCoefficient; }
00047 
00048 
00049         bool            operator==(CoeffListEntry & entry);
00050 
00051         P_or_QPolynom getPorQinfo() const {     return porq;    }
00052 
00053 
00054         CoeffListEntry *next;
00055         CoeffListEntry const * getNextConst() const;
00056         void printEntry(std::ostream & out) const;
00057 
00058 private :
00059 
00060 
00061         
00062         
00063 
00064 };
00065 
00066 
00077 class CoeffList
00078 {
00079 protected:
00080         CoeffListEntry  head;
00081         CoeffListEntry* last;
00082 public:
00083         CoeffList();
00084         virtual ~CoeffList();
00085         CoeffListEntry* getFirst();
00086 
00087         CoeffListEntry const * getFirstConst() const;
00088 
00089 
00090         
00091         bool isEmpty() const ;
00092         void output(std::ostream& os);
00093         
00094         void clear();
00095         void append(CoeffListEntry *entry);
00096 
00097         bool containsEntry(P_or_QPolynom p_oder_q, const int xExp,  const int yExp ) const;
00098 
00099         bool containsEntry(const CoeffListEntry & entry ) const;
00100 };
00101 
00102 
00103 std::ostream &  operator<<(std::ostream & out, const CoeffListEntry& centry);
00104 
00105 
00106 };
00107 
00108 #endif // !defined(COEFFLIST_1F7F503B)
Generated on Tue Nov 23 13:10:51 2010 for centerfocus by  doxygen 1.6.3