version 1.30, 2004/08/23 08:33:55 |
version 1.32, 2004/08/31 04:45:42 |
|
|
% $OpenXM: OpenXM/src/kan96xx/Kan/dr.sm1,v 1.29 2004/08/22 12:52:34 takayama Exp $ |
% $OpenXM: OpenXM/src/kan96xx/Kan/dr.sm1,v 1.31 2004/08/27 08:33:27 takayama Exp $ |
%% dr.sm1 (Define Ring) 1994/9/25, 26 |
%% dr.sm1 (Define Ring) 1994/9/25, 26 |
%% This file is error clean. |
%% This file is error clean. |
|
|
|
|
/univ vars 0 get reverse |
/univ vars 0 get reverse |
vars 1 get reverse join |
vars 1 get reverse join |
def |
def |
|
w-vectors to_int /w-vectors set |
[ |
[ |
0 1 << w-vectors length 1 sub >> |
0 1 << w-vectors length 1 sub >> |
{ |
{ |
|
|
/arg2 set /arg1 set |
/arg2 set /arg1 set |
[/univ /www /k /vname /vweight /ans] pushVariables |
[/univ /www /k /vname /vweight /ans] pushVariables |
/univ arg1 def /www arg2 def |
/univ arg1 def /www arg2 def |
[ |
[ |
|
www to_int /www set |
/ans << univ length >> -1 0 evecw def |
/ans << univ length >> -1 0 evecw def |
0 2 << www length 2 sub >> |
0 2 << www length 2 sub >> |
{ |
{ |
|
|
[ |
[ |
/fff arg1 def |
/fff arg1 def |
/www arg2 def |
/www arg2 def |
|
www to_int /www set |
fff (0). eq { /ddd -intInfinity def /ord_w.LLL goto} { } ifelse |
fff (0). eq { /ddd -intInfinity def /ord_w.LLL goto} { } ifelse |
fff (ring) dc /rrr set |
fff (ring) dc /rrr set |
fff init /fff set |
fff init /fff set |
|
|
[ |
[ |
/fff arg1 def |
/fff arg1 def |
/www arg2 def |
/www arg2 def |
|
www to_int /www set |
fff (0). eq { /ddd -intInfinity def /ord_w_all.LLL goto} { } ifelse |
fff (0). eq { /ddd -intInfinity def /ord_w_all.LLL goto} { } ifelse |
/ddd -intInfinity def |
/ddd -intInfinity def |
fff (ring) dc /rrr set |
fff (ring) dc /rrr set |
Line 4111 $ [ff ff] fromVectors :: $ |
|
Line 4115 $ [ff ff] fromVectors :: $ |
|
(It normalizes a given vector of Q into a vector of Z with relatively prime) |
(It normalizes a given vector of Q into a vector of Z with relatively prime) |
(entries by multiplying a postive number.) |
(entries by multiplying a postive number.) |
]] putUsages |
]] putUsages |
|
|
|
/getNode { |
|
/arg2 set |
|
/arg1 set |
|
[/in-getNode /ob /key /rr /rr /ii] pushVariables |
|
[ |
|
/ob arg1 def |
|
/key arg2 def |
|
/rr null def |
|
{ |
|
ob isClass { |
|
ob (array) dc /ob set |
|
} { exit } ifelse |
|
ob 0 get key eq { |
|
/rr ob def |
|
exit |
|
} { } ifelse |
|
ob 2 get /ob set |
|
0 1 ob length 1 sub { |
|
/ii set |
|
ob ii get key getNode /rr set |
|
rr tag 0 eq { } { exit } ifelse |
|
} for |
|
exit |
|
} loop |
|
/arg1 rr def |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
[(getNode) |
|
[(ob key getNode) |
|
(ob is a class object.) |
|
(The operator getNode returns the node with the key in ob.) |
|
(The node is an array of the format [key attr-list node-list]) |
|
(Example:) |
|
( /dog [(dog) [[(legs) 4] ] [ ]] [(class) (tree)] dc def) |
|
( /man [(man) [[(legs) 2] ] [ ]] [(class) (tree)] dc def) |
|
( /ma [(mammal) [ ] [man dog]] [(class) (tree)] dc def) |
|
( ma (dog) getNode ) |
|
]] putUsages |
|
|
|
|
/usages { |
/usages { |
/arg1 set |
/arg1 set |