public class MLMultiArray extends NSObject implements NSSecureCoding
| Modifier and Type | Class and Description |
|---|---|
static interface |
MLMultiArray.Block_initWithDataPointerShapeDataTypeStridesDeallocatorError |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
MLMultiArray(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
static boolean |
accessInstanceVariablesDirectly() |
static MLMultiArray |
alloc() |
static MLMultiArray |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(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.Class |
classForKeyedUnarchiver() |
long |
count()
Count of total number of elements
|
org.moe.natj.general.ptr.VoidPtr |
dataPointer()
Unsafe pointer to underlying buffer holding the data
|
long |
dataType()
Type of element held
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
encodeWithCoder(NSCoder coder) |
static long |
hash_static() |
MLMultiArray |
init() |
MLMultiArray |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
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
|
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
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static MLMultiArray |
multiArrayByConcatenatingMultiArraysAlongAxisDataType(NSArray<? extends MLMultiArray> multiArrays,
long axis,
long dataType)
Concatenate MLMultiArrays to form a new MLMultiArray.
|
static MLMultiArray |
new_objc() |
NSNumber |
objectAtIndexedSubscript(long idx)
Get a value by its linear index (assumes C-style index ordering)
|
NSNumber |
objectForKeyedSubscript(NSArray<? extends NSNumber> key)
Get a value by its multidimensional index (NSArray
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setObjectAtIndexedSubscript(NSNumber obj,
long idx)
Set a value by its linear index (assumes C-style index ordering)
|
void |
setObjectForKeyedSubscript(NSNumber obj,
NSArray<? extends NSNumber> key)
Set a value by subindicies (NSArray
|
static void |
setVersion_static(long aVersion) |
NSArray<? extends NSNumber> |
shape()
An array containing the sizes of each dimension in the multiarray
|
NSArray<? extends NSNumber> |
strides()
An array containing the stride in memory for each dimension.
|
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
static long |
version_static() |
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, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static MLMultiArray alloc()
public static MLMultiArray allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public long count()
public org.moe.natj.general.ptr.VoidPtr dataPointer()
public long dataType()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public MLMultiArray init()
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)
public MLMultiArray initWithShapeDataTypeError(NSArray<? extends NSNumber> shape, long dataType, org.moe.natj.general.ptr.Ptr<NSError> error)
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static MLMultiArray new_objc()
public NSNumber objectAtIndexedSubscript(long idx)
public NSNumber objectForKeyedSubscript(NSArray<? extends NSNumber> key)
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public void setObjectAtIndexedSubscript(NSNumber obj, long idx)
public void setObjectForKeyedSubscript(NSNumber obj, NSArray<? extends NSNumber> key)
public static void setVersion_static(long aVersion)
public NSArray<? extends NSNumber> shape()
public NSArray<? extends NSNumber> strides()
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingpublic MLMultiArray initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodingpublic static MLMultiArray multiArrayByConcatenatingMultiArraysAlongAxisDataType(NSArray<? extends MLMultiArray> multiArrays, long axis, long dataType)
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.
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 MLMultiArraypublic static boolean supportsSecureCoding()
public boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCoding