Changeset f2e972 in git
- Timestamp:
- Sep 8, 1997, 1:13:43 PM (26 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 8e6674ec04c524b77f3d7fdc1570fddadfaa16c3
- Parents:
- 62b35b6166c3ecaaa5f8435ff487c59e7c5533d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_map.h
r62b35b6 rf2e972 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_map.h,v 1. 8 1997-08-28 07:22:39schmidt Exp $ */2 /* $Id: cf_map.h,v 1.9 1997-09-08 11:13:43 schmidt Exp $ */ 3 3 4 4 #ifndef INCL_CF_MAP_H … … 40 40 //{{{ inline method docu 41 41 // 42 // Variable var () const43 // CanonicalForm subst () const42 // Variable var () const 43 // CanonicalForm subst () const 44 44 // 45 45 // var(), subst() - selectors, return V and P, resp. … … 52 52 CanonicalForm S; 53 53 public: 54 MapPair ( const Variable & v, const CanonicalForm & s ) : V(v), S(s) {}55 MapPair () : V(), S(1) {}56 MapPair ( const MapPair & p ) : V(p.V), S(p.S) {}57 ~MapPair () {}58 MapPair & operator = ( const MapPair & p );59 Variable var () const { return V; }60 CanonicalForm subst () const { return S; }54 MapPair ( const Variable & v, const CanonicalForm & s ) : V(v), S(s) {} 55 MapPair () : V(), S(1) {} 56 MapPair ( const MapPair & p ) : V(p.V), S(p.S) {} 57 ~MapPair () {} 58 MapPair & operator = ( const MapPair & p ); 59 Variable var () const { return V; } 60 CanonicalForm subst () const { return S; } 61 61 #ifndef NOSTREAMIO 62 friend ostream & operator << ( ostream& s, const MapPair & p );62 friend ostream & operator << ( ostream & s, const MapPair & p ); 63 63 #endif /* NOSTREAMIO */ 64 64 }; … … 75 75 // Use an object of class CFMap to insert 'values' into canonical 76 76 // form. Such a mapping is defined by a list of MapPairs (V -> S) 77 // describing which canonical form S to insert for variable v.77 // describing which canonical form S to insert for variable V. 78 78 // Hereby, the substituted canonical forms are not subject to 79 79 // further substitutions. … … 87 87 MPList P; 88 88 public: 89 CFMap () {}90 CFMap ( const CanonicalForm & s ) : P( MapPair( Variable(), s ) ) {}91 CFMap ( const Variable & v ) : P( MapPair( v, 1 ) ) {}92 CFMap ( const Variable & v, const CanonicalForm & s ) : P( MapPair( v, s ) ) {}93 ~CFMap () {}94 CFMap ( const CFList & L );95 CFMap ( const CFMap & m ) : P( m.P ) {}89 CFMap () {} 90 CFMap ( const CanonicalForm & s ) : P( MapPair( Variable(), s ) ) {} 91 CFMap ( const Variable & v ) : P( MapPair( v, 1 ) ) {} 92 CFMap ( const Variable & v, const CanonicalForm & s ) : P( MapPair( v, s ) ) {} 93 ~CFMap () {} 94 CFMap ( const CFList & L ); 95 CFMap ( const CFMap & m ) : P( m.P ) {} 96 96 CFMap & operator = ( const CFMap & m ); 97 void newpair ( const Variable & v, const CanonicalForm & s );97 void newpair ( const Variable & v, const CanonicalForm & s ); 98 98 CanonicalForm operator () ( const CanonicalForm & f ) const; 99 99 #ifndef NOSTREAMIO 100 friend ostream & operator << ( ostream& s, const CFMap & m );100 friend ostream & operator << ( ostream & s, const CFMap & m ); 101 101 #endif /* NOSTREAMIO */ 102 102 };
Note: See TracChangeset
for help on using the changeset viewer.