25119
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2018 by 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 |
"
|
24574
|
12 |
"{ Package: 'stx:libbasic' }"
|
|
13 |
|
|
14 |
"{ NameSpace: Smalltalk }"
|
|
15 |
|
|
16 |
SequenceableCollection variableSubclass:#AbstractMultidimensionalArray
|
|
17 |
instanceVariableNames:''
|
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
|
20 |
category:'Collections-MultiDimensional'
|
|
21 |
!
|
|
22 |
|
25119
|
23 |
!AbstractMultidimensionalArray class methodsFor:'documentation'!
|
|
24 |
|
|
25 |
copyright
|
|
26 |
"
|
|
27 |
COPYRIGHT (c) 2018 by eXept Software AG
|
|
28 |
All Rights Reserved
|
|
29 |
|
|
30 |
This software is furnished under a license and may be used
|
|
31 |
only in accordance with the terms of that license and with the
|
|
32 |
inclusion of the above copyright notice. This software may not
|
|
33 |
be provided or otherwise made available to, or used by, any
|
|
34 |
other person. No title to or ownership of the software is
|
|
35 |
hereby transferred.
|
|
36 |
|
|
37 |
"
|
|
38 |
! !
|
24574
|
39 |
|
24675
|
40 |
!AbstractMultidimensionalArray class methodsFor:'queries'!
|
|
41 |
|
|
42 |
isAbstract
|
|
43 |
"Return if this class is an abstract class.
|
|
44 |
True is returned here for myself only; false for subclasses.
|
|
45 |
Abstract subclasses must redefine this again."
|
|
46 |
|
|
47 |
^ self == AbstractMultidimensionalArray.
|
|
48 |
! !
|
|
49 |
|
24591
|
50 |
!AbstractMultidimensionalArray methodsFor:'accessing'!
|
|
51 |
|
|
52 |
dimensions
|
|
53 |
self subclassResponsibility
|
|
54 |
! !
|
|
55 |
|
24574
|
56 |
!AbstractMultidimensionalArray methodsFor:'error handling'!
|
|
57 |
|
|
58 |
dimensionError
|
|
59 |
self error:'number of dimensions vs. number of given indices'
|
|
60 |
! !
|
|
61 |
|
24591
|
62 |
!AbstractMultidimensionalArray methodsFor:'queries'!
|
|
63 |
|
|
64 |
isSquare
|
|
65 |
|dims|
|
|
66 |
|
|
67 |
dims := self dimensions.
|
|
68 |
^ dims size == 2
|
|
69 |
and:[(dims at:1) == (dims at:2)]
|
|
70 |
! !
|
|
71 |
|
24574
|
72 |
!AbstractMultidimensionalArray class methodsFor:'documentation'!
|
|
73 |
|
|
74 |
version_CVS
|
|
75 |
^ '$Header$'
|
|
76 |
! !
|
|
77 |
|