883
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1997 eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
|
|
14 |
|
1177
|
15 |
"{ Package: 'stx:libbasic2' }"
|
|
16 |
|
|
17 |
UnboxedIntegerArray variableSignedWordSubclass:#SignedWordArray
|
557
|
18 |
instanceVariableNames:''
|
|
19 |
classVariableNames:''
|
|
20 |
poolDictionaries:''
|
|
21 |
category:'Collections-Arrayed'
|
|
22 |
!
|
|
23 |
|
|
24 |
!SignedWordArray class methodsFor:'documentation'!
|
|
25 |
|
883
|
26 |
copyright
|
|
27 |
"
|
|
28 |
COPYRIGHT (c) 1997 eXept Software AG
|
|
29 |
All Rights Reserved
|
|
30 |
|
|
31 |
This software is furnished under a license and may be used
|
|
32 |
only in accordance with the terms of that license and with the
|
|
33 |
inclusion of the above copyright notice. This software may not
|
|
34 |
be provided or otherwise made available to, or used by, any
|
|
35 |
other person. No title to or ownership of the software is
|
|
36 |
hereby transferred.
|
|
37 |
"
|
|
38 |
|
|
39 |
|
|
40 |
!
|
|
41 |
|
557
|
42 |
documentation
|
|
43 |
"
|
703
|
44 |
SignedWordArrays store 16bit signed integers in the range -16r8000..16r7FFF.
|
557
|
45 |
They are much like WordArrays, but the values stored are signed.
|
|
46 |
In contrast to normal arrays (which store pointers to their elements),
|
|
47 |
signedWordArrays store the values in a dense & compact way.
|
1177
|
48 |
Since the representation fits the underlying C-language systems representation
|
|
49 |
of signed int16's, this is also useful to pass bulk data to c primitive code.
|
|
50 |
|
|
51 |
Therefore, SignedWordArrays can be used to hold bulk data in a more compact way.
|
736
|
52 |
For example:
|
|
53 |
Array new:100000 withAll:1
|
|
54 |
requires 400k of object memory;
|
557
|
55 |
|
736
|
56 |
in contrast,
|
1177
|
57 |
SignedWordArray new:100000 withAll:1
|
736
|
58 |
only requires half of it.
|
|
59 |
|
|
60 |
[memory requirements:]
|
|
61 |
OBJ-HEADER + (size * 2)
|
557
|
62 |
|
|
63 |
[see also:]
|
736
|
64 |
ByteArray WordArray BooleanArray FloatArray DoubleArray Array
|
|
65 |
IntegerArray LongIntegerArray SignedLongIntegerArray
|
557
|
66 |
|
|
67 |
[author:]
|
736
|
68 |
Claus Gittinger
|
557
|
69 |
"
|
|
70 |
! !
|
|
71 |
|
|
72 |
!SignedWordArray class methodsFor:'documentation'!
|
|
73 |
|
|
74 |
version
|
1177
|
75 |
^ '$Header: /cvs/stx/stx/libbasic2/SignedWordArray.st,v 1.5 2003-04-22 09:39:29 cg Exp $'
|
557
|
76 |
! !
|