1 -- File: SystemRelation.cdl
2 -- Created: Mon Jan 14 09:50:50 1991
3 -- Author: Arnaud BOUZY
5 ---Copyright: Matra Datavision 1991
7 class SystemRelation from Expr
9 inherits GeneralRelation from Expr
11 uses SequenceOfGeneralRelation from Expr,
12 GeneralExpression from Expr,
13 NamedUnknown from Expr,
14 AsciiString from TCollection
16 raises OutOfRange,NoSuchObject,DimensionMismatch,NumericError
20 Create(relation : GeneralRelation)
21 ---Purpose: Creates a system with one relation
23 returns mutable SystemRelation;
25 Add(me : mutable; relation : GeneralRelation)
26 ---Purpose: Appends <relation> in the list of components of <me>.
30 Remove(me : mutable; relation : GeneralRelation)
32 raises NoSuchObject,DimensionMismatch
36 ---Purpose: Tests if <me> is linear between its NamedUnknowns.
41 ---Purpose: Returns the number of relations contained in <me>.
45 NbOfSingleRelations(me)
46 ---Purpose: Returns the number of SingleRelations contained in
51 SubRelation(me; index : Integer)
52 ---Purpose: Returns the relation denoted by <index> in <me>.
53 -- An exception is raised if <index> is out of range.
54 returns any GeneralRelation
62 ---Purpose: Returns a GeneralRelation after replacement of
63 -- NamedUnknowns by an associated expression, and after
64 -- values computation.
65 returns mutable GeneralRelation
68 Simplify(me : mutable)
69 ---Purpose: Replaces NamedUnknowns by associated expressions,
70 -- and computes values in <me>.
74 ---Purpose: Returns a copy of <me> having the same unknowns and functions.
75 returns mutable like me;
77 Contains(me; exp : GeneralExpression)
78 ---Purpose: Tests if <me> contains <exp>.
81 Replace(me : mutable ; var : NamedUnknown ; with : GeneralExpression);
82 ---Purpose: Replaces all occurences of <var> with <with> in <me>.
85 ---Purpose: returns a string representing <me> in a readable way.
90 myRelations : SequenceOfGeneralRelation;