Package apple.coreml
Class MLMultiArray
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.coreml.MLMultiArray
-
- All Implemented Interfaces:
NSCoding,NSSecureCoding,NSObject
public class MLMultiArray extends NSObject implements NSSecureCoding
Multidimensional Array
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMLMultiArray.Block_initWithDataPointerShapeDataTypeStridesDeallocatorError-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMLMultiArray(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()static MLMultiArrayalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()longcount()Count of total number of elementsorg.moe.natj.general.ptr.VoidPtrdataPointer()Unsafe pointer to underlying buffer holding the datalongdataType()Type of element heldstatic java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidencodeWithCoder(NSCoder coder)static longhash_static()MLMultiArrayinit()MLMultiArrayinitWithCoder(NSCoder coder)NS_DESIGNATED_INITIALIZERMLMultiArrayinitWithDataPointerShapeDataTypeStridesDeallocatorError(org.moe.natj.general.ptr.VoidPtr dataPointer, NSArray<? extends NSNumber> shape, long dataType, NSArray<? extends NSNumber> strides, MLMultiArray.Block_initWithDataPointerShapeDataTypeStridesDeallocatorError deallocator, org.moe.natj.general.ptr.Ptr<NSError> error)Create by wrapping existing dataMLMultiArrayinitWithShapeDataTypeError(NSArray<? extends NSNumber> shape, long dataType, org.moe.natj.general.ptr.Ptr<NSError> error)Create by C-style contiguous array by allocating and managing the necessary memorystatic NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static MLMultiArraymultiArrayByConcatenatingMultiArraysAlongAxisDataType(NSArray<? extends MLMultiArray> multiArrays, long axis, long dataType)Concatenate MLMultiArrays to form a new MLMultiArray.static java.lang.Objectnew_objc()NSNumberobjectAtIndexedSubscript(long idx)Get a value by its linear index (assumes C-style index ordering)NSNumberobjectForKeyedSubscript(NSArray<? extends NSNumber> key)Get a value by its multidimensional index (NSArray) static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetObjectAtIndexedSubscript(NSNumber obj, long idx)Set a value by its linear index (assumes C-style index ordering)voidsetObjectForKeyedSubscript(NSNumber obj, NSArray<? extends NSNumber> key)Set a value by subindicies (NSArray) static voidsetVersion_static(long aVersion)NSArray<? extends NSNumber>shape()An array containing the sizes of each dimension in the multiarrayNSArray<? extends NSNumber>strides()An array containing the stride in memory for each dimension.static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static MLMultiArray alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
count
public long count()
Count of total number of elements
-
dataPointer
public org.moe.natj.general.ptr.VoidPtr dataPointer()
Unsafe pointer to underlying buffer holding the data
-
dataType
public long dataType()
Type of element held
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
init
public MLMultiArray init()
-
initWithDataPointerShapeDataTypeStridesDeallocatorError
public MLMultiArray initWithDataPointerShapeDataTypeStridesDeallocatorError(org.moe.natj.general.ptr.VoidPtr dataPointer, NSArray<? extends NSNumber> shape, long dataType, NSArray<? extends NSNumber> strides, MLMultiArray.Block_initWithDataPointerShapeDataTypeStridesDeallocatorError deallocator, org.moe.natj.general.ptr.Ptr<NSError> error)
Create by wrapping existing data
-
initWithShapeDataTypeError
public MLMultiArray initWithShapeDataTypeError(NSArray<? extends NSNumber> shape, long dataType, org.moe.natj.general.ptr.Ptr<NSError> error)
Create by C-style contiguous array by allocating and managing the necessary memory
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
objectAtIndexedSubscript
public NSNumber objectAtIndexedSubscript(long idx)
Get a value by its linear index (assumes C-style index ordering)
-
objectForKeyedSubscript
public NSNumber objectForKeyedSubscript(NSArray<? extends NSNumber> key)
Get a value by its multidimensional index (NSArray)
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setObjectAtIndexedSubscript
public void setObjectAtIndexedSubscript(NSNumber obj, long idx)
Set a value by its linear index (assumes C-style index ordering)
-
setObjectForKeyedSubscript
public void setObjectForKeyedSubscript(NSNumber obj, NSArray<? extends NSNumber> key)
Set a value by subindicies (NSArray)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
shape
public NSArray<? extends NSNumber> shape()
An array containing the sizes of each dimension in the multiarray
-
strides
public NSArray<? extends NSNumber> strides()
An array containing the stride in memory for each dimension. The element referred to by a multidimensional index is located at an offset equal to sum_d index[d]*strides[d]. This offset is in the units of the specified dataType.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
- Specified by:
encodeWithCoderin interfaceNSCoding
-
initWithCoder
public MLMultiArray initWithCoder(NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
multiArrayByConcatenatingMultiArraysAlongAxisDataType
public static MLMultiArray multiArrayByConcatenatingMultiArraysAlongAxisDataType(NSArray<? extends MLMultiArray> multiArrays, long axis, long dataType)
Concatenate MLMultiArrays to form a new MLMultiArray. All the source MLMultiArrays must have a same shape except the specified axis. The resultant MLMultiArray has the same shape as inputs except this axis, which dimension will be the sum of all the input dimensions of the axis. For example, \code // Swift let A = try MLMultiArray(shape: [2, 3], dataType: .int32) let B = try MLMultiArray(shape: [2, 2], dataType: .int32) let C = MLMultiArray(concatenating: [A, B], axis: 1, dataType: .int32) assert(C.shape == [2, 5]) \endcode \code // Obj-C MLMultiArray *A = [[MLMultiArray alloc] initWithShape:@[@2, @3] dataType:MLMultiArrayDataTypeInt32 error:NULL]; MLMultiArray *B = [[MLMultiArray alloc] initWithShape:@[@2, @2] dataType:MLMultiArrayDataTypeInt32 error:NULL]; MLMultiArray *C = [MLMultiArray multiArrayByConcatenatingMultiArrays:@[A, B] alongAxis:1 dataType:MLMultiArrayDataTypeInt32]; assert(C.shape == @[@2, @5]) \endcode Numeric data will be up or down casted as needed. The method raises NSInvalidArgumentException if the shapes of input multi arrays are not compatible for concatenation.- Parameters:
multiArrays- Array of MLMultiArray instances to be concatenated.axis- Axis index with which the concatenation will performed. The value is wrapped by the dimension of the axis. For example, -1 is the last axis.dataType- The data type of the resultant MLMultiArray
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.- Specified by:
_supportsSecureCodingin interfaceNSSecureCoding
-
-