Go to the first, previous, next, last section, table of contents.
In this mode, LIC
can handle matrix and linear inequality
operations as well as integer operations.
'+' '-' '*' '/'
)
LIC
. The type of the
variable is either integer or matrix (same as linear inequalities)
depending on the first assignment
to the variable (use of a variable without first assigning to it is of
course illegal).
The names of the variables can be any combination of alphabetic
characters except for reserved keywords.
n = 4
A = ident(n)*A
[ 0, 1, 2 0<3> 0, -1, 3 ]Note that `0<3>' is same as `0, 0, 0'
{ A, ., B ., C, D }Note that ``.'' is a matrix with 0's
LIC
. When
creating inequalities, each dimension is assigned a number which is the
column number in the final matrix. For example, the dimension 3 is
represented by `@3'. An inequality is delimited by an exclamation
mark `!...!'. Within the delimiters, any mathematical
expression of integers, integer variables and dimension symbols is
valid, as long as the resulting inequality is a linear function of the
dimensions. Any of the operators `=, ==, >, >=, <, <=' can be used
to construct an inequality. Some combination of two operators such as
a <= b < c are also valid.
parse(inequality)
!inequality!
[ 1 0 4 0 0 -8 ]
Let us look at how to convert the following inequalities into this format.
- V = 1000
- 1 <= i1 <= V
- 1 <= i2 <= U
- 32*p1 <= i1-1 < 32 + 32*p1
- 32*p2 <= 12-1 < 32 + 32*p2
When writing inequalities, the dimensions should be identified, ordered and numbered. For example, the following list is a list of dimensions and the corresponding numbers for the above example
Dimension: U p1 p2 i1 i2 Number: 1 2 3 4 5Next we can create the above set of inequalities:
V = 1000 ineq = { !1 <= @4 <= V! !1 <= @5 <= @1! !32@2 <= @4 - 1 < 32 + 32@2! !32@3 <= @5 - 1 < 32 + 32@3! }The resulting system of inequalities is
1000 0 0 0 -1 0 -1 0 0 0 1 0 0 1 0 0 0 -1 -1 0 0 0 0 1 32 0 32 0 -1 0 -1 0 -32 0 1 0 32 0 0 32 0 -1 -1 0 0 -32 0 1
LIC
. When more than one function is
listed below, they are all equivalent. The available function calls
are:
identity(n)
ident(n)
id(n)
M.solve()
solve(M)
M.solve
M.s()
s(M)
M.s
filterthru(M, F, s)
M.filterthru(F, s)
ft(M, F, s)
M.ft(F, s)
filteraway(M, F, s)
M.filteraway(F, s)
fa(M, F, s)
M.fa(F, s)
row_swap(M, i, j)
M.row_swap(i, j)
rs(M, i, j)
M.rs(i, j)
col_swap(M, i, j)
M.col_swap(i, j)
cs(M, i, j)
M.cs(i, j)
row_del(M, i, j)
M.row_del(i, j)
row_del(M, i)
M.row_del(i)
rd(M, i, j)
M.rd(i, j)
rd(M, i)
M.rd(i)
col_del(M, i, j)
M.col_del(i, j)
col_del(M, i)
M.col_del(i)
cd(M, i, j)
M.cd(i, j)
cd(M, i)
M.cd(i)
col_ins(M, i)
M.col_ins(i)
ci(M, i)
M.ci(i)
M.inverse()
inverse(M)
M.inverse
M.inv()
inv(M)
M.inv
M.transpose()
transpose(M)
M.transpose
M.t()
t(M)
M.t
M.code(namelist)
Go to the first, previous, next, last section, table of contents.