205 ^ MissingClassInLiteralArrayErrorSignal |
207 ^ MissingClassInLiteralArrayErrorSignal |
206 |
208 |
207 "Created: / 18.5.1999 / 14:50:04 / cg" |
209 "Created: / 18.5.1999 / 14:50:04 / cg" |
208 ! ! |
210 ! ! |
209 |
211 |
210 !SequenceableCollection class methodsFor:'instance creation-multiDimensional'! |
|
211 |
|
212 _at:nIndices |
|
213 "this is a synthetic selector, generated by the compiler, |
|
214 if a construct of the form expr[idx...] is parsed. |
|
215 I.e. |
|
216 Array[n] |
|
217 generates |
|
218 Array _at: n |
|
219 " |
|
220 |
|
221 ^ self new:nIndices |
|
222 ! |
|
223 |
|
224 _at:dim1 at:dim2 |
|
225 "this is a synthetic selector, generated by the compiler, |
|
226 if a construct of the form expr[idx...] is parsed. |
|
227 I.e. |
|
228 Array[n,m] |
|
229 generates |
|
230 Array _at:n at:m |
|
231 " |
|
232 |
|
233 "MultiDimensionalArrayAccessor is in package stx:goodies/math/matrix. |
|
234 This method should probably be an extension method of this package" |
|
235 |
|
236 |data| |
|
237 |
|
238 data := self newWithSize:(dim1 * dim2). |
|
239 ^ MultiDimensionalArrayAccessor |
|
240 collection:data |
|
241 dimensions:(Array with:dim1 with:dim2) |
|
242 |
|
243 "Modified (format): / 22-02-2019 / 11:57:05 / Stefan Vogel" |
|
244 ! |
|
245 |
|
246 _at:dim1 at:dim2 at:dim3 |
|
247 "this is a synthetic selector, generated by the compiler, |
|
248 if a construct of the form expr[idx...] is parsed. |
|
249 I.e. |
|
250 Array[n,m,o] |
|
251 generates |
|
252 Array _at:n at:m at:o |
|
253 " |
|
254 |
|
255 "MultiDimensionalArrayAccessor is in package stx:goodies/math/matrix. |
|
256 This method should probably be an extension method of this package" |
|
257 |
|
258 |data| |
|
259 |
|
260 data := self newWithSize:(dim1 * dim2 * dim3). |
|
261 ^ MultiDimensionalArrayAccessor |
|
262 collection:data |
|
263 dimensions:(Array with:dim1 with:dim2 with:dim3) |
|
264 |
|
265 "Modified (comment): / 22-02-2019 / 11:56:54 / Stefan Vogel" |
|
266 ! ! |
|
267 |
212 |
268 !SequenceableCollection class methodsFor:'instance creation-streaming'! |
213 !SequenceableCollection class methodsFor:'instance creation-streaming'! |
269 |
214 |
270 new:newSize streamContents:blockWithArg |
215 new:newSize streamContents:blockWithArg |
271 "create a write-stream on an instance of the receiver-class with initial size, |
216 "create a write-stream on an instance of the receiver-class with initial size, |
442 True is returned for SequenceableCollection here; false for subclasses. |
387 True is returned for SequenceableCollection here; false for subclasses. |
443 Abstract subclasses must redefine this again." |
388 Abstract subclasses must redefine this again." |
444 |
389 |
445 ^ self == SequenceableCollection |
390 ^ self == SequenceableCollection |
446 ! ! |
391 ! ! |
447 |
|
448 |
|
449 |
392 |
450 !SequenceableCollection methodsFor:'Compatibility-Squeak'! |
393 !SequenceableCollection methodsFor:'Compatibility-Squeak'! |
451 |
394 |
452 allButFirst |
395 allButFirst |
453 "Return a copy of the receiver containing all but the first element. |
396 "Return a copy of the receiver containing all but the first element. |
739 !SequenceableCollection methodsFor:'Compatibility-VW'! |
682 !SequenceableCollection methodsFor:'Compatibility-VW'! |
740 |
683 |
741 replaceElementsFrom:start to:stop withArray:anArray startingAt:repStart |
684 replaceElementsFrom:start to:stop withArray:anArray startingAt:repStart |
742 ^ self replaceFrom:start to:stop with:anArray startingAt:repStart |
685 ^ self replaceFrom:start to:stop with:anArray startingAt:repStart |
743 ! ! |
686 ! ! |
744 |
|
745 |
687 |
746 !SequenceableCollection methodsFor:'accessing'! |
688 !SequenceableCollection methodsFor:'accessing'! |
747 |
689 |
748 after:anObject |
690 after:anObject |
749 "return the element, after anObject. |
691 "return the element, after anObject. |
7894 |
7836 |
7895 ^ 0 |
7837 ^ 0 |
7896 |
7838 |
7897 "Created: 14.2.1997 / 16:13:03 / cg" |
7839 "Created: 14.2.1997 / 16:13:03 / cg" |
7898 ! ! |
7840 ! ! |
7899 |
|
7900 |
7841 |
7901 !SequenceableCollection methodsFor:'searching'! |
7842 !SequenceableCollection methodsFor:'searching'! |
7902 |
7843 |
7903 detect:aBlock startingAt:startIndex |
7844 detect:aBlock startingAt:startIndex |
7904 "find the first element, for which evaluation of the argument, aBlock returns true. |
7845 "find the first element, for which evaluation of the argument, aBlock returns true. |