com.mathworks.toolbox.javabuilder.MWFunctionHandle Class
Namespace: com.mathworks.toolbox.javabuilder
Java class to represent function handles in MATLAB
Description
Declaration
public class MWFunctionHandle extends MWMatrixRef
The MWFunctionHandle class represents a MATLAB function handle
Implemented Interfaces: Disposable
,
java.io.Serializable
, java.lang.Cloneable
,
java.lang.Comparable
Creation
Constructors
This class contains no public constructors.
Properties
Public Properties
EMPTY_ARRAY
— Represent an empty array
public static final MWArray
A convenient, efficient, and consistent way to represent an empty array as follows:
public static final MWArray EMPTY_ARRAY
Methods
Public Methods
applyVisitor |
This
method is abstract and returns a type specified by the type parameter <T>.
It takes an instance of Parameters:
Returns:
|
classID |
Returns the MATLAB type of this array. Overrides:
Returns:
|
clone |
Creates and returns a deep copy of this array. Changing the data in a deep copy does not change the original array. Returns: An MWFunctionHandle instance representing a deep copy of the underlying MATLAB array. Throws:
|
columnIndex |
Returns an array containing the column index of each element in the underlying MATLAB array. Overrides:
Returns: Array of indices. |
compareTo |
Compares this array with the specified array for order. Specified by:
Overrides:
Parameters:
|
deserialize |
Create a new MWArray from serialized data. Parameters:
Returns: The deserialized MWArray. |
dispose |
Frees the native MATLAB array contained by this array. Specified
by:
Specified
by:
|
equals |
Indicates whether some other array is equal to this one. Overrides:
Parameters:
|
get |
Returns the element at the specified 1-based offset in this array. Overrides:
Parameters:
Returns: Object containing the requested element. |
get |
Returns the element at the specified 1-based index-array in this array. Overrides:
Parameters:
Returns: Object containing the requested element. |
getData |
Returns a 1-D array containing a copy of the data in the underlying MATLAB array. The elements of the returned array are converted according to default conversion rules. If the underlying MATLAB array is a complex numeric type, getData returns the real part. If the underlying array is a cell or struct array, toArray is recursively called on each cell. Overrides:
Parameters:
Returns: A 1-D array of elements stored in column-wise order. The length of the returned array equals numberOfElements() for a non-sparse array, and numberOfNonZeros() for a sparse array. |
getDimensions |
Returns an array containing the size of each dimension of this array. Overrides:
Returns: Array containing size of each dimension. |
hashCode |
Returns a hash code value for this array. Overrides:
|
isEmpty |
Tests if this array has no elements. Overrides:
Returns:
|
isSparse |
Tests if this array is sparse. Overrides:
Returns:
|
maximumNonZeros |
Returns the allocated capacity of a sparse array. If the underlying array is non-sparse, this method returns the same value as numberOfElements(). Overrides:
Returns: Currently allocated number of non-zero elements in a sparse array. |
numberOfDimensions |
Returns the number of dimensions of this array. Overrides:
Returns: number of dimensions. |
numberOfElements |
Returns the total number of elements in this array. Overrides:
Returns: Number of elements. |
numberOfNonZeros |
Returns the number of non-zero elements in a sparse array. If the underlying array is non-sparse, this method returns the same value as numberOfElements(). Overrides:
Returns: Current number of non-zero elements in a sparse array. |
readResolve |
Called by serialization mechanism when loading a new array from a byte stream. This method validates the correct array type. Returns: Returns this Object indicating validated array type. Throws:
|
rowIndex |
Returns an array containing the row index of each element in the underlying MATLAB array. Overrides:
Returns: Array of indices. |
serialize |
Serialize the MATLAB array to a byte array. Returns: The serialized MATLAB array data. Throws:
|
set |
Replaces the element at the specified 1-based offset in this array with the specified element. Overrides:
Parameters:
|
setData |
Overrides:
|
sharedCopy |
Creates and returns a shared copy of this array. Overrides:
Returns: An MWFunctionHandle instance representing a shared copy of the underlying MATLAB array. |
toArray |
Returns an array containing a copy of the data in the underlying MATLAB array. The returned array has the same dimensionality as the underlying MATLAB array. The elements of the returned array are converted according to default conversion rules. If the underlying MATLAB array is a complex numeric type, toArray returns the real part. If the underlying array is sparse, a full representation of the array is returned. Care should be taken when calling toArray on a sparse array with large row and column dimensions, as this action may exhaust system memory. If the underlying array is a cell or struct array, toArray is recursively called on each cell. Overrides:
Returns: An array with the same dimensionality of the MATLAB array. |
toString |
Returns a string representation of this array. Overrides:
|
validate |
Validates the internal array handle. Called by constructors and deserialization code. |
Inherited Methods
Methods inherited from class
com.mathworks.toolbox.javabuilder.MWArray
.
disposeArray |
Methods inherited from class java.lang.Object
.
finalize |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
getClass |
Returns the runtime class of this Object. |
notify |
|
notifyAll |
Wakes up all threads that are waiting on this object's monitor. |
wait |
Causes
the current thread to wait until another thread invokes the
|
Version History
Introduced in R2006a
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)