com.mathworks.toolbox.javabuilder.MWMatrixRef Class
Namespace: com.mathworks.toolbox.javabuilder
Java class to represent matrix references in MATLAB
Description
Declaration
public class MWMatrixRef extends MWArray
The MWMatrixRef class represents a MATLAB Matrix Reference.
Implemented Interfaces: Disposable
,
java.io.Serializable
, java.lang.Cloneable
,
java.lang.Comparable
Direct Known Subclasses:
MWFunctionHandle
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. Returns: MWClassID of this array. |
clone |
Creates and returns a deep copy of this array. Changing the data in a deep copy does not change the original array. Returns: A MWMatrixRef 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. Returns: Array of indices. |
compareTo |
Compares this array with the specified array for order. Specified by:
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. Parameters:
|
get |
Returns the element at the specified 1-based offset in this array. Parameters:
Returns: Object containing the requested element. |
get |
Returns the element at the specified 1-based index-array in this array. 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,
Returns: A 1-D array of
elements stored in column-wise order. The length of the returned array equals
|
getDimensions |
Returns an array containing the size of each dimension of this array. Returns: Array containing size of each dimension. |
hashCode |
Returns a hash code value for this array. |
isEmpty |
Tests if this array has no elements. Returns:
|
isSparse |
Tests if this array is sparse. Returns:
|
maximumNonZeros |
Returns the
allocated capacity of a sparse array. If the underlying array is non-sparse, this
method returns the same value as
Returns: Currently allocated number of non-zero elements in a sparse array. |
numberOfDimensions |
Returns the number of dimensions of this array. Returns: Number of dimensions. |
numberOfElements |
Returns the total number of elements in this array. 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
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. Returns: Array of indices. |
serialize |
Serialize the MATLAB array to a byte array. Parameters:
Returns: The serialized MATLAB array data. Throws:
|
set |
Replaces the element at the specified 1-based offset in this array with the specified element. Parameters:
|
set |
Replaces the element at the specified 1-based index-array in this array with the specified element. Parameters:
|
setData |
|
sharedCopy |
Creates and returns a shared copy of this array. Returns: A MWMatrixRef 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, Returns: An array with the same dimensionality of the MATLAB array. |
toString |
Returns a string representation of this array. |
validate |
Validates the internal array handle. Called by constructors and deserialization code. |
Inherited Methods
Methods inherited from class
com.mathworks.toolbox.javabuilder.MWArray
.
disposeArray |
This
method destroys any native MATLAB arrays contained in the input object and frees
the memory occupied by them. This is a static method of the class and thus does
not need to be invoked in reference to an instance of the class. If the input
object implements the Example: Constructing an
MWArray[] MArr = new MWArray[10]; for (int i = 0; i < 10; i++) MArr[i] = new MWNumericArray(); MWArray.disposeArray(MArr); Parameters:
|
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 Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)