diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet index 86a4b55..f906c5f 100644 --- a/books/bookvol10.3.pamphlet +++ b/books/bookvol10.3.pamphlet @@ -141788,6 +141788,370 @@ UniversalSegment(S: Type): SegmentCategory(S) with \end{chunk} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{domain U16VEC U16Vector} + +\begin{chunk}{U16Vector.input} +)set break resume +)sys rm -f U16Vector.output +)spool U16Vector.output +)set message test on +)set message auto off +)clear all + +--S 1 of 12 +t1:=empty()$U16Vector +--R +--R (1) [] +--R Type: U16Vector +--E 1 + +--S 2 of 12 +t2:=new(10,10)$U16Vector +--R +--R (2) [10,10,10,10,10,10,10,10,10,10] +--R Type: U16Vector +--E 2 + +--S 3 of 12 +t3:=qelt(t2,2) +--R +--R (3) 10 +--R Type: PositiveInteger +--E 3 + +--S 4 of 12 +t4:=elt(t2,2) +--R +--R (4) 10 +--R Type: PositiveInteger +--E 4 + +--S 5 of 12 +t5:=t2.2 +--R +--R (5) 10 +--R Type: PositiveInteger +--E 5 + +--S 6 of 12 +t6:=qsetelt!(t2,2,5) +--R +--R (6) 5 +--R Type: PositiveInteger +--E 6 + +--S 7 of 12 +t2.2 +--R +--R (7) 5 +--R Type: PositiveInteger +--E 7 + +--S 8 of 12 +t7:=setelt(t2,3,6) +--R +--R (8) 6 +--R Type: PositiveInteger +--E 8 + +--S 9 of 12 +t2.3 +--R +--R (9) 6 +--R Type: PositiveInteger +--E 9 + +--S 10 of 12 +#t2 +--R +--R (10) 10 +--R Type: PositiveInteger +--E 10 + +--S 11 of 12 +t8:=fill!(t2,7) +--R +--R (11) [7,7,7,7,7,7,7,7,7,7] +--R Type: U16Vector +--E 11 + +--S 12 of 12 +)show U16Vector +--R U16Vector is a domain constructor +--R Abbreviation for U16Vector is U16VEC +--R This constructor is exposed in this frame. +--R Issue )edit bookvol10.3.pamphlet to see algebra source code for U16VEC +--R +--R------------------------------- Operations -------------------------------- +--R concat : List(%) -> % concat : (%,%) -> % +--R concat : (Integer,%) -> % concat : (%,Integer) -> % +--R construct : List(Integer) -> % copy : % -> % +--R delete : (%,Integer) -> % ?.? : (%,Integer) -> Integer +--R empty : () -> % empty? : % -> Boolean +--R entries : % -> List(Integer) eq? : (%,%) -> Boolean +--R index? : (Integer,%) -> Boolean indices : % -> List(Integer) +--R insert : (%,%,Integer) -> % qelt : (%,Integer) -> Integer +--R reverse : % -> % sample : () -> % +--R #? : % -> NonNegativeInteger if $ has finiteAggregate +--R ? Boolean if Integer has ORDSET +--R ?<=? : (%,%) -> Boolean if Integer has ORDSET +--R ?=? : (%,%) -> Boolean if Integer has SETCAT +--R ?>? : (%,%) -> Boolean if Integer has ORDSET +--R ?>=? : (%,%) -> Boolean if Integer has ORDSET +--R any? : ((Integer -> Boolean),%) -> Boolean if $ has finiteAggregate +--R coerce : % -> OutputForm if Integer has SETCAT +--R convert : % -> InputForm if Integer has KONVERT(INFORM) +--R copyInto! : (%,%,Integer) -> % if $ has shallowlyMutable +--R count : (Integer,%) -> NonNegativeInteger if $ has finiteAggregate and Integer has SETCAT +--R count : ((Integer -> Boolean),%) -> NonNegativeInteger if $ has finiteAggregate +--R delete : (%,UniversalSegment(Integer)) -> % +--R ?.? : (%,UniversalSegment(Integer)) -> % +--R elt : (%,Integer,Integer) -> Integer +--R entry? : (Integer,%) -> Boolean if $ has finiteAggregate and Integer has SETCAT +--R eval : (%,List(Integer),List(Integer)) -> % if Integer has EVALAB(INT) and Integer has SETCAT +--R eval : (%,Integer,Integer) -> % if Integer has EVALAB(INT) and Integer has SETCAT +--R eval : (%,Equation(Integer)) -> % if Integer has EVALAB(INT) and Integer has SETCAT +--R eval : (%,List(Equation(Integer))) -> % if Integer has EVALAB(INT) and Integer has SETCAT +--R every? : ((Integer -> Boolean),%) -> Boolean if $ has finiteAggregate +--R fill! : (%,Integer) -> % if $ has shallowlyMutable +--R find : ((Integer -> Boolean),%) -> Union(Integer,"failed") +--R first : % -> Integer if Integer has ORDSET +--R hash : % -> SingleInteger if Integer has SETCAT +--R insert : (Integer,%,Integer) -> % +--R latex : % -> String if Integer has SETCAT +--R less? : (%,NonNegativeInteger) -> Boolean +--R map : (((Integer,Integer) -> Integer),%,%) -> % +--R map : ((Integer -> Integer),%) -> % +--R map! : ((Integer -> Integer),%) -> % if $ has shallowlyMutable +--R max : (%,%) -> % if Integer has ORDSET +--R maxIndex : % -> Integer if Integer has ORDSET +--R member? : (Integer,%) -> Boolean if $ has finiteAggregate and Integer has SETCAT +--R members : % -> List(Integer) if $ has finiteAggregate +--R merge : (%,%) -> % if Integer has ORDSET +--R merge : (((Integer,Integer) -> Boolean),%,%) -> % +--R min : (%,%) -> % if Integer has ORDSET +--R minIndex : % -> Integer if Integer has ORDSET +--R more? : (%,NonNegativeInteger) -> Boolean +--R new : (NonNegativeInteger,Integer) -> % +--R parts : % -> List(Integer) if $ has finiteAggregate +--R position : (Integer,%,Integer) -> Integer if Integer has SETCAT +--R position : (Integer,%) -> Integer if Integer has SETCAT +--R position : ((Integer -> Boolean),%) -> Integer +--R qsetelt! : (%,Integer,Integer) -> Integer if $ has shallowlyMutable +--R reduce : (((Integer,Integer) -> Integer),%) -> Integer if $ has finiteAggregate +--R reduce : (((Integer,Integer) -> Integer),%,Integer) -> Integer if $ has finiteAggregate +--R reduce : (((Integer,Integer) -> Integer),%,Integer,Integer) -> Integer if $ has finiteAggregate and Integer has SETCAT +--R remove : ((Integer -> Boolean),%) -> % if $ has finiteAggregate +--R remove : (Integer,%) -> % if $ has finiteAggregate and Integer has SETCAT +--R removeDuplicates : % -> % if $ has finiteAggregate and Integer has SETCAT +--R reverse! : % -> % if $ has shallowlyMutable +--R select : ((Integer -> Boolean),%) -> % if $ has finiteAggregate +--R setelt : (%,UniversalSegment(Integer),Integer) -> Integer if $ has shallowlyMutable +--R setelt : (%,Integer,Integer) -> Integer if $ has shallowlyMutable +--R size? : (%,NonNegativeInteger) -> Boolean +--R sort : % -> % if Integer has ORDSET +--R sort : (((Integer,Integer) -> Boolean),%) -> % +--R sort! : % -> % if $ has shallowlyMutable and Integer has ORDSET +--R sort! : (((Integer,Integer) -> Boolean),%) -> % if $ has shallowlyMutable +--R sorted? : % -> Boolean if Integer has ORDSET +--R sorted? : (((Integer,Integer) -> Boolean),%) -> Boolean +--R swap! : (%,Integer,Integer) -> Void if $ has shallowlyMutable +--R ?~=? : (%,%) -> Boolean if Integer has SETCAT +--R +--E 12 + +)spool +)lisp (bye) +\end{chunk} +\begin{chunk}{U16Vector.help} +==================================================================== +U16Vector examples +==================================================================== + +t1:=empty()$U16Vector + [] + +t2:=new(10,10)$U16Vector + [10,10,10,10,10,10,10,10,10,10] + +t3:=qelt(t2,2) + 10 + +t4:=elt(t2,2) + 10 + +t5:=t2.2 + 10 + +t6:=qsetelt!(t2,2,5) + 5 + +t2.2 + 5 + +t7:=setelt(t2,3,6) + 6 + +t2.3 + 6 + +#t2 + 10 + +t8:=fill!(t2,7) + [7,7,7,7,7,7,7,7,7,7] + +See Also: +o )show U16Vector +o )show U32Vector + +\end{chunk} +\pagehead{U16Vector}{U16VEC} +\pagepic{ps/v103u16vector.eps}{U16VEC}{1.00} +{\bf See}\\ +\pageto{Segment}{SEG} +\pageto{SegmentBinding}{SEGBIND} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\cross{U16VEC}{\#{}?} & +\cross{U16VEC}{?.?} & +\cross{U16VEC}{?.?} & +\cross{U16VEC}{?$<=$?} & +\cross{U16VEC}{?$<$?} \\ +\cross{U16VEC}{?=?} & +\cross{U16VEC}{?$>=$?} & +\cross{U16VEC}{?$>$?} & +\cross{U16VEC}{?\~{}=?} & +\cross{U16VEC}{any?} \\ +\cross{U16VEC}{coerce} & +\cross{U16VEC}{concat} & +\cross{U16VEC}{construct} & +\cross{U16VEC}{convert} & +\cross{U16VEC}{copy} \\ +\cross{U16VEC}{copyInto!} & +\cross{U16VEC}{count} & +\cross{U16VEC}{delete} & +\cross{U16VEC}{elt} & +\cross{U16VEC}{empty} \\ +\cross{U16VEC}{empty?} & +\cross{U16VEC}{entries} & +\cross{U16VEC}{entry?} & +\cross{U16VEC}{eq?} & +\cross{U16VEC}{eval} \\ +\cross{U16VEC}{every?} & +\cross{U16VEC}{fill!} & +\cross{U16VEC}{find} & +\cross{U16VEC}{first} & +\cross{U16VEC}{hash} \\ +\cross{U16VEC}{index?} & +\cross{U16VEC}{indices} & +\cross{U16VEC}{insert} & +\cross{U16VEC}{latex} & +\cross{U16VEC}{less?} \\ +\cross{U16VEC}{map} & +\cross{U16VEC}{map!} & +\cross{U16VEC}{max} & +\cross{U16VEC}{maxIndex} & +\cross{U16VEC}{member?} \\ +\cross{U16VEC}{members} & +\cross{U16VEC}{merge} & +\cross{U16VEC}{min} & +\cross{U16VEC}{minIndex} & +\cross{U16VEC}{more?} \\ +\cross{U16VEC}{new} & +\cross{U16VEC}{parts} & +\cross{U16VEC}{position} & +\cross{U16VEC}{qelt} & +\cross{U16VEC}{qsetelt!} \\ +\cross{U16VEC}{reduce} & +\cross{U16VEC}{remove} & +\cross{U16VEC}{removeDuplicates} & +\cross{U16VEC}{reverse} & +\cross{U16VEC}{reverse!} \\ +\cross{U16VEC}{sample} & +\cross{U16VEC}{select} & +\cross{U16VEC}{setelt} & +\cross{U16VEC}{size?} & +\cross{U16VEC}{sort} \\ +\cross{U16VEC}{sort!} & +\cross{U16VEC}{sorted?} & +\cross{U16VEC}{swap!} && +\end{tabular} + +\begin{chunk}{domain U16VEC U16Vector} +)abbrev domain U16VEC U16Vector +++ Author: Waldek Hebisch +++ Description: This is a low-level domain which implements vectors +++ (one dimensional arrays) of unsigned 16-bit numbers. Indexing +++ is 0 based, there is no bound checking (unless provided by +++ lower level). +U16Vector() : OneDimensionalArrayAggregate Integer == add + Qsize ==> QVLENU16$Lisp + Qelt ==> ELTU16$Lisp + Qsetelt ==> SETELTU16$Lisp + Qnew ==> GETREFVU16$Lisp + + #x == Qsize x + ++ returns the length of the vector + ++ + ++X t1:=new(10,10)$U16Vector + ++X #t1 + + minIndex x == 0 + ++ minIndex returns the minimum index of the vector + ++ + ++X t1:=new(10,10)$U16Vector + ++X minIndex t1 + + empty() == Qnew(0$Lisp, 0$Lisp) + ++ empty() returns a new vector of length 0 + ++ + ++X t1:=empty()$U16Vector + + new(n, x) == Qnew (n, x) + ++ new(n, x) returns a new vector of length n filled with x + ++ + ++X t1:=new(10,7)$U16Vector + + qelt(x, i) == Qelt(x, i) + ++ qelt(x, i) returns the i-th element of x + ++ + ++X t1:=new(10,7)$U16Vector + ++X qelt(t1,3) + + elt(x:%, i:Integer) == Qelt(x, i) + ++ elt(x, i) returns the i-th element of x + ++ + ++X t1:=new(10,7)$U16Vector + ++X elt(t1,3) + + qsetelt_!(x, i, s) == Qsetelt(x, i, s) + ++ qsetelt(x, i, s) modifies the i-th element of x to be s + ++ + ++X t1:=new(10,7)$U16Vector + ++X qsetelt!(t1,3,9) + + setelt(x:%, i:Integer, s:Integer) == Qsetelt(x, i, s) + ++ setelt(x, i, s) modifies the i-th element of x to be s + ++ + ++X t1:=new(10,7)$U16Vector + ++X setelt(t1,3,9) + + fill_!(x, s) == (for i in 0..((Qsize x) - 1) repeat Qsetelt(x, i, s); x) + ++ fill!(x, s) modifies a vector x so every element has value s + ++ + ++X t1:=new(10,7)$U16Vector + ++X fill!(t1,9) + +\end{chunk} +\begin{chunk}{U16VEC.dotabb} +"U16VEC" [color="#88FF44",href="bookvol10.3.pdf#nameddest=U16VEC"] +"A1AGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=A1AGG"] +"U16VEC" -> "A1AGG" + +\end{chunk} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{domain U32VEC U32Vector} \begin{chunk}{U32Vector.input} @@ -141798,7 +142162,84 @@ UniversalSegment(S: Type): SegmentCategory(S) with )set message auto off )clear all ---S 1 of 1 +--S 1 of 12 +t1:=empty()$U32Vector +--R +--R (1) [] +--R Type: U32Vector +--E 1 + +--S 2 of 12 +t2:=new(10,10)$U32Vector +--R +--R (2) [10,10,10,10,10,10,10,10,10,10] +--R Type: U32Vector +--E 2 + +--S 3 of 12 +t3:=qelt(t2,2) +--R +--R (3) 10 +--R Type: PositiveInteger +--E 3 + +--S 4 of 12 +t4:=elt(t2,2) +--R +--R (4) 10 +--R Type: PositiveInteger +--E 4 + +--S 5 of 12 +t5:=t2.2 +--R +--R (5) 10 +--R Type: PositiveInteger +--E 5 + +--S 6 of 12 +t6:=qsetelt!(t2,2,5) +--R +--R (6) 5 +--R Type: PositiveInteger +--E 6 + +--S 7 of 12 +t2.2 +--R +--R (7) 5 +--R Type: PositiveInteger +--E 7 + +--S 8 of 12 +t7:=setelt(t2,3,6) +--R +--R (8) 6 +--R Type: PositiveInteger +--E 8 + +--S 9 of 12 +t2.3 +--R +--R (9) 6 +--R Type: PositiveInteger +--E 9 + +--S 10 of 12 +#t2 +--R +--R (10) 10 +--R Type: PositiveInteger +--E 10 + +--S 11 of 12 +t8:=fill!(t2,7) +--R +--R (11) [7,7,7,7,7,7,7,7,7,7] +--R Type: U32Vector +--E 11 + +--S 12 of 12 )show U32Vector --R --R U32Vector is a domain constructor @@ -141882,7 +142323,7 @@ UniversalSegment(S: Type): SegmentCategory(S) with --R swap! : (%,Integer,Integer) -> Void if $ has shallowlyMutable --R ?~=? : (%,%) -> Boolean if Integer has SETCAT --R ---E 1 +--E 12 )spool )lisp (bye) @@ -141892,8 +142333,51 @@ UniversalSegment(S: Type): SegmentCategory(S) with U32Vector examples ==================================================================== +t1:=empty()$U32Vector + [] + +t2:=new(10,10)$U32Vector + [10,10,10,10,10,10,10,10,10,10] + +t3:=qelt(t2,2) + 10 + +t4:=elt(t2,2) + 10 + +t5:=t2.2 + 10 + +t6:=qsetelt!(t2,2,5) + 5 + +t2.2 + 5 + +t7:=setelt(t2,3,6) + 6 + +t2.3 + 6 + +#t2 + 10 + +t8:=fill!(t2,7) + [7,7,7,7,7,7,7,7,7,7] + +)spool +)lisp (bye) + +\end{chunk} +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} See Also: o )show U32Vector +o )show U16Vector \end{chunk} \pagehead{U32Vector}{U32VEC} @@ -141983,14 +142467,56 @@ U32Vector() : OneDimensionalArrayAggregate Integer == add Qnew ==> GETREFVU32$Lisp #x == Qsize x + ++ returns the length of the vector + ++ + ++X t1:=new(10,10)$U32Vector + ++X #t1 + minIndex x == 0 + ++ minIndex returns the minimum index of the vector + ++ + ++X t1:=new(10,10)$U32Vector + ++X minIndex t1 + empty() == Qnew(0$Lisp, 0$Lisp) + ++ empty() returns a new vector of length 0 + ++ + ++X t1:=empty()$U32Vector + new(n, x) == Qnew (n, x) + ++ new(n, x) returns a new vector of length n filled with x + ++ + ++X t1:=new(10,7)$U32Vector + qelt(x, i) == Qelt(x, i) + ++ qelt(x, i) returns the i-th element of x + ++ + ++X t1:=new(10,7)$U32Vector + ++X qelt(t1,3) + elt(x:%, i:Integer) == Qelt(x, i) + ++ elt(x, i) returns the i-th element of x + ++ + ++X t1:=new(10,7)$U32Vector + ++X elt(t1,3) + qsetelt_!(x, i, s) == Qsetelt(x, i, s) + ++ qsetelt(x, i, s) modifies the i-th element of x to be s + ++ + ++X t1:=new(10,7)$U32Vector + ++X qsetelt!(t1,3,9) + setelt(x:%, i:Integer, s:Integer) == Qsetelt(x, i, s) - fill_!(x, s) == (for i in 0..((Qsize x) - 1) repeat Qsetelt(x, i, s); x) + ++ setelt(x, i, s) modifies the i-th element of x to be s + ++ + ++X t1:=new(10,7)$U32Vector + ++X setelt(t1,3,9) + + fill_!(x, s) == (for i in 0..((Qsize x) - 1) repeat Qsetelt(x, i, s); x) + ++ fill!(x, s) modifies a vector x so every element has value s + ++ + ++X t1:=new(10,7)$U32Vector + ++X fill!(t1,9) \end{chunk} \begin{chunk}{U32VEC.dotabb} @@ -152956,6 +153482,8 @@ Note that this code is not included in the generated catdef.spad file. \getchunk{domain UTSZ UnivariateTaylorSeriesCZero} \getchunk{domain UNISEG UniversalSegment} +\getchunk{domain U16VEC U16Vector} +\getchunk{domain U32VEC U32Vector} \getchunk{domain VARIABLE Variable} \getchunk{domain VECTOR Vector} \getchunk{domain VOID Void} diff --git a/books/ps/v103u16vector.eps b/books/ps/v103u16vector.eps new file mode 100644 index 0000000..5c58451 --- /dev/null +++ b/books/ps/v103u16vector.eps @@ -0,0 +1,278 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: graphviz version 2.26.3 (20100126.1600) +%%Title: pic +%%Pages: 1 +%%BoundingBox: 36 36 118 152 +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 118 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 82 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 41 translate +0.16355 0.45339 0.92549 graphcolor +newpath -4 -5 moveto +-4 112 lineto +79 112 lineto +79 -5 lineto +closepath fill +1 setlinewidth +0.16355 0.45339 0.92549 graphcolor +newpath -4 -5 moveto +-4 112 lineto +79 112 lineto +79 -5 lineto +closepath stroke +% U16VEC +gsave +[ /Rect [ 0 72 74 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=U16VEC) >> + /Subtype /Link +/ANN pdfmark +0.27273 0.73333 1 nodecolor +newpath 74 108 moveto +0 108 lineto +0 72 lineto +74 72 lineto +closepath fill +1 setlinewidth +filled +0.27273 0.73333 1 nodecolor +newpath 74 108 moveto +0 108 lineto +0 72 lineto +74 72 lineto +closepath stroke +0 0 0 nodecolor +14 /Times-Roman set_font +8 86.4 moveto 58 (U16VEC) alignedtext +grestore +% A1AGG +gsave +[ /Rect [ 3 0 71 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=A1AGG) >> + /Subtype /Link +/ANN pdfmark +0.60606 0.73333 1 nodecolor +newpath 71 36 moveto +3 36 lineto +3 0 lineto +71 0 lineto +closepath fill +1 setlinewidth +filled +0.60606 0.73333 1 nodecolor +newpath 71 36 moveto +3 36 lineto +3 0 lineto +71 0 lineto +closepath stroke +0 0 0 nodecolor +14 /Times-Roman set_font +11 14.4 moveto 52 (A1AGG) alignedtext +grestore +% U16VEC->A1AGG +gsave +1 setlinewidth +0 0 0 edgecolor +newpath 37 71.83 moveto +37 64.13 37 54.97 37 46.42 curveto +stroke +0 0 0 edgecolor +newpath 40.5 46.41 moveto +37 36.41 lineto +33.5 46.41 lineto +closepath fill +1 setlinewidth +solid +0 0 0 edgecolor +newpath 40.5 46.41 moveto +37 36.41 lineto +33.5 46.41 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +end +restore +%%EOF diff --git a/changelog b/changelog index 33f3f5a..7f62e02 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +20130223 tpd src/axiom-website/patches.html 20130223.02.tpd.patch +20130223 tpd src/algebra/Makefile add machinearithmetic.input +20130223 tpd src/input/machinearithmetic.input test U16Vector +20130223 tpd books/bookvol10.3 add U16Vector +20130223 tpd books/ps/v103u16vector.eps added 20130223 tpd src/axiom-website/patches.html 20130223.01.tpd.patch 20130223 tpd books/bookvol5 fix exposure for MAGCDOC category 20130221 tpd src/axiom-website/patches.html 20130221.01.tpd.patch diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index e2c499b..d67ff07 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -4113,7 +4113,7 @@ LAYER8=\ ${OUT}/PROJSP.o \ ${OUT}/REDORDER.o ${OUT}/SRAGG.o ${OUT}/SRAGG-.o ${OUT}/STREAM.o \ ${OUT}/SYMPOLY.o ${OUT}/TS.o ${OUT}/TUPLE.o ${OUT}/UPSCAT.o \ - ${OUT}/UPSCAT-.o ${OUT}/U32VEC.o \ + ${OUT}/UPSCAT-.o ${OUT}/U16VEC.o ${OUT}/U32VEC.o \ ${OUT}/VECTCAT.o ${OUT}/VECTCAT-.o ${OUT}/XDPOLY.o \ ${OUT}/XEXPPKG.o ${OUT}/XF.o ${OUT}/XF-.o ${OUT}/XPBWPOLY.o \ ${OUT}/XPOLY.o ${OUT}/XRPOLY.o \ diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 7db0f12..bedd7fc 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3979,5 +3979,7 @@ books/bookvol10.2 add MAGCDOC books/bookvol10.3 update U32Vector domain, add machinearithmetic 20130223.01.tpd.patch books/bookvol5 fix exposure for MAGCDOC category +20130223.02.tpd.patch +books/bookvol10.3 add U16Vector diff --git a/src/input/machinearithmetic.input.pamphlet b/src/input/machinearithmetic.input.pamphlet index 48af66e..79479fb 100644 --- a/src/input/machinearithmetic.input.pamphlet +++ b/src/input/machinearithmetic.input.pamphlet @@ -18,83 +18,160 @@ )set message auto off )clear all ---S 1 of 11 +--S 1 of 22 t1:=empty()$U32Vector --R --R (1) [] --R Type: U32Vector --E 1 ---S 2 of 11 +--S 2 of 22 t2:=new(10,10)$U32Vector --R --R (2) [10,10,10,10,10,10,10,10,10,10] --R Type: U32Vector --E 2 ---S 3 of 11 +--S 3 of 22 t3:=qelt(t2,2) --R --R (3) 10 --R Type: PositiveInteger --E 3 ---S 4 of 11 +--S 4 of 22 t4:=elt(t2,2) --R --R (4) 10 --R Type: PositiveInteger --E 4 ---S 5 of 11 +--S 5 of 22 t5:=t2.2 --R --R (5) 10 --R Type: PositiveInteger --E 5 ---S 6 of 11 +--S 6 of 22 t6:=qsetelt!(t2,2,5) --R --R (6) 5 --R Type: PositiveInteger --E 6 ---S 7 of 11 +--S 7 of 22 t2.2 --R --R (7) 5 --R Type: PositiveInteger --E 7 ---S 8 of 11 +--S 8 of 22 t7:=setelt(t2,3,6) --R --R (8) 6 --R Type: PositiveInteger --E 8 ---S 9 of 11 +--S 9 of 22 t2.3 --R --R (9) 6 --R Type: PositiveInteger --E 9 ---S 10 of 11 +--S 10 of 22 #t2 --R --R (10) 10 --R Type: PositiveInteger --E 10 ---S 11 of 11 +--S 11 of 22 t8:=fill!(t2,7) --R --R (11) [7,7,7,7,7,7,7,7,7,7] --R Type: U32Vector --E 11 +--S 12 of 22 +ta:=empty()$U16Vector +--R +--R (12) [] +--R Type: U16Vector +--E 12 + +--S 13 of 22 +tb:=new(10,10)$U16Vector +--R +--R (13) [10,10,10,10,10,10,10,10,10,10] +--R Type: U16Vector +--E 13 + +--S 14 of 22 +tc:=qelt(tb,2) +--R +--R (14) 10 +--R Type: PositiveInteger +--E 14 + +--S 15 of 22 +td:=elt(tb,2) +--R +--R (15) 10 +--R Type: PositiveInteger +--E 15 + +--S 16 of 22 +te:=tb.2 +--R +--R (16) 10 +--R Type: PositiveInteger +--E 16 + +--S 17 of 22 +tf:=qsetelt!(tb,2,5) +--R +--R (17) 5 +--R Type: PositiveInteger +--E 17 + +--S 18 of 22 +tb.2 +--R +--R (18) 5 +--R Type: PositiveInteger +--E 18 + +--S 19 of 22 +tg:=setelt(tb,3,6) +--R +--R (19) 6 +--R Type: PositiveInteger +--E 19 + +--S 20 of 22 +tb.3 +--R +--R (20) 6 +--R Type: PositiveInteger +--E 20 + +--S 21 of 22 +#tb +--R +--R (21) 10 +--R Type: PositiveInteger +--E 21 + +--S 22 of 22 +th:=fill!(tb,7) +--R +--R (22) [7,7,7,7,7,7,7,7,7,7] +--R Type: U16Vector +--E 22 + )spool )lisp (bye)