matlabcontrol.link.MatlabLogicalFullMatrix Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of matconsolectl Show documentation
Show all versions of matconsolectl Show documentation
MatConsoleCtl - control MATLAB from Java
/*
* Code licensed under new-style BSD (see LICENSE).
* All code up to tags/original: Copyright (c) 2013, Joshua Kaplan
* All code after tags/original: Copyright (c) 2016, DiffPlug
*/
package matlabcontrol.link;
/**
*
* @since 4.2.0
* @author Joshua Kaplan
*/
class MatlabLogicalFullMatrix extends MatlabLogicalMatrix {
private final FullArray _array;
MatlabLogicalFullMatrix(boolean[] values, int[] dimensions) {
_array = new FullArray(boolean[].class, values, null, dimensions);
}
MatlabLogicalFullMatrix(T values) {
_array = new FullArray(boolean[].class, values, null);
}
@Override
BaseArray getBaseArray() {
return _array;
}
@Override
public boolean getElementAtLinearIndex(int linearIndex) {
return _array._real[linearIndex];
}
@Override
public boolean getElementAtIndices(int row, int column) {
return _array._real[_array.getLinearIndex(row, column)];
}
@Override
public boolean getElementAtIndices(int row, int column, int page) {
return _array._real[_array.getLinearIndex(row, column, page)];
}
@Override
public boolean getElementAtIndices(int row, int column, int[] pages) {
return _array._real[_array.getLinearIndex(row, column, pages)];
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy