diff -r 359aae8f9ec4 -r 277c065ea204 ComplexDoubleArray.st --- a/ComplexDoubleArray.st Sun May 06 03:17:53 2018 +0200 +++ b/ComplexDoubleArray.st Sun May 06 03:19:57 2018 +0200 @@ -1,3 +1,5 @@ +"{ Encoding: utf8 }" + " COPYRIGHT (c) 2018 by Claus Gittinger All Rights Reserved @@ -134,6 +136,28 @@ baseIdx := index * 2. self basicAt:(baseIdx - 1) put:aComplex real. self basicAt:(baseIdx) put:aComplex imaginary. +! + +at:index put:realPart i:imaginaryPart + |baseIdx| + + baseIdx := index * 2. + self basicAt:(baseIdx - 1) put:realPart. + self basicAt:(baseIdx) put:imaginaryPart. +! + +imaginaryAt:index + |baseIdx| + + baseIdx := index * 2. + ^ (self basicAt:(baseIdx)) +! + +realAt:index + |baseIdx| + + baseIdx := index * 2. + ^ (self basicAt:(baseIdx - 1)) ! ! !ComplexDoubleArray methodsFor:'queries'!