Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Supports/floating_linear_inequalities.ads, Revision 1.1.1.1
1.1 maekawa 1: with Standard_Floating_Numbers; use Standard_Floating_Numbers;
2: with Standard_Integer_Vectors; use Standard_Integer_Vectors;
3: with Standard_Floating_Vectors; use Standard_Floating_Vectors;
4: with Standard_Floating_Matrices; use Standard_Floating_Matrices;
5:
6: package Floating_Linear_Inequalities is
7:
8: -- DESCRIPTION :
9: -- This procedure contains some routines for verifying the Farkas lemma.
10:
11: procedure Complementary_Slackness
12: ( tableau : in out Matrix; lastcol : in integer;
13: rhs : in out Standard_Floating_Vectors.Vector;
14: tol : in double_float;
15: solution : out Standard_Floating_Vectors.Vector;
16: columns : out Standard_Integer_Vectors.Vector;
17: feasible : out boolean );
18:
19: procedure Complementary_Slackness
20: ( tableau : in out Matrix;
21: rhs : in out Standard_Floating_Vectors.Vector;
22: tol : in double_float;
23: solution : out Standard_Floating_Vectors.Vector;
24: columns : out Standard_Integer_Vectors.Vector;
25: feasible : out boolean );
26:
27: -- DESCRIPTION :
28: -- Solves the complementary slackness problem: determines
29: -- whether there exists a positive combination of the columns
30: -- such that the right hand side is satisfied.
31:
32: -- REQUIRED :
33: -- rhs'range = solution'range = columns'range = tableau'range(1)
34:
35: -- ON ENTRY :
36: -- tableau inequalities as columns;
37: -- lastcol indicates the last significant column in the tableau,
38: -- if not given, then lastcol = tableau'last(2);
39: -- tol tolerance to decide whether a number equals zero.
40: -- rhs right hand side vector;
41:
42: -- ON RETURN :
43: -- tableau modified tableau of inequalities;
44: -- rhs modified right hand side;
45: -- solution the computed solution;
46: -- columns indicates which columns has been used;
47: -- feasible if true then the solution is feasible.
48:
49: end Floating_Linear_Inequalities;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>