UnboxedFloatArray.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 23804 0db00ab3ecfe
child 25019 f40303739cfe
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...

"
 COPYRIGHT (c) 2019 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libbasic' }"

"{ NameSpace: Smalltalk }"

AbstractNumberVector subclass:#UnboxedFloatArray
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Collections-Arrayed'
!

!UnboxedFloatArray class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2019 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    An abstract superclass for all unboxed float classes.
    In contrast to normal arrays (which store pointers to their elements),
    unboxedFloatArrays store the values in a dense & compact way. 
    Since the representation fits corresponding underlying C-language representations,
    these are also useful to pass bulk data to c primitive code.

    [see also:]
        ByteArray WordArray BooleanArray FloatArray DoubleArray Array
        IntegerArray LongIntegerArray SignedLongIntegerArray

    [author:]
        Claus Gittinger
"
! !

!UnboxedFloatArray class methodsFor:'queries'!

isAbstract
    "Return if this class is an abstract class.
     True is returned for UnboxedFloatArray here; false for subclasses.
     Abstract subclasses must redefine this again."

    ^ self == UnboxedFloatArray

    "Created: / 03-03-2019 / 00:21:15 / Claus Gittinger"
! !

!UnboxedFloatArray methodsFor:'queries'!

defaultElement
    ^ 0.0

    "Created: / 03-03-2019 / 00:22:22 / Claus Gittinger"
!

isValidElement:anObject
    "return true, if I can hold this kind of object"

    ^ anObject isNumber
    "/ and:[ (anObject >= self class minVal)
    "/ and:[ (anObject <= self class maxVal) ]]

    "Created: / 03-03-2019 / 00:22:48 / Claus Gittinger"
! !

!UnboxedFloatArray methodsFor:'testing'!

isFloatArray
    "return true if the receiver has float elements.
     These are Float-, Double and HalfFloat arrays"

    ^ true

    "Created: / 03-03-2019 / 00:23:38 / Claus Gittinger"
! !

!UnboxedFloatArray class methodsFor:'documentation'!

version_CVS
    ^ '$Header$'
! !