روش های آرایه

روش های آرایه

روش های آرایه
روش های آرایه برای افزودن، حذف، درج و استخراج زیرمجموعه های آرایه های 1 بعدی و 2 بعدی استفاده می شود.

 
Name
Syntax
Description
getColumn
String[] getColumn(String[][] matrix, int column)
Returns a String[] for a specified column in the matrix. Useful when values have been read from a file and only certain columns should be shown in a table.
getColumn
double[] getColumn(double[][] matrix, int column)
Returns a double[] for a specified column in the matrix.
getColumn
int[] getColumn(int[][] matrix, int column)
Returns an int[] for a specified column in the matrix.
getColumn
boolean[] getColumn(boolean[][] matrix, int column)
Returns a boolean[] for a specified column in the matrix.
getSubMatrix
String[][] getSubMatrix(String[][] matrix, int startCol, int endCol, int startRow, int endRow)
Returns a rectangular submatrix of the input matrix spanning columns from startCol to endCol, and rows from startRow to endRow.
getSubMatrix
double[][] getSubMatrix(double[][] matrix, int startCol,int endCol, int startRow, int endRow)
Returns a rectangular submatrix of the input matrix spanning columns from startCol to endCol, and rows from startRow to endRow.
getSubMatrix
int[][] getSubMatrix(int[][] matrix, int startCol, int endCol, int startRow, int endRow)
Returns a rectangular submatrix of the input matrix spanning columns from startCol to endCol, and rows from startRow to endRow.
getSubMatrix
boolean[][] getSubMatrix(boolean[][] matrix, int startCol, int endCol, int startRow, int endRow)
Returns a rectangular submatrix of the input matrix spanning columns from startCol to endCol, and rows from startRow to endRow.
insert
String[] insert(String[] array, String value, int index)
Inserts an element at position index in an array and returns the expanded array.
insert
double[] insert(double[] array, double value, int index)
Inserts an element at position index in an array and returns the expanded array.
insert
int[] insert(int[] array, int value, int index)
Inserts an element at position index in an array and returns the expanded array.
insert
boolean[] insert(boolean[] array, boolean value, int index)
Inserts an element at position index in an array and returns the expanded array.
insert
String[] insert(String[] array, String[] value, int[] index)
Inserts elements in an array at positions given by the index array and returns the expanded array.
insert
double[] insert(double[] array, double[] value, int[] index)
Inserts elements in an array at positions given by the index array and returns the expanded array.
insert
int[] insert(int[] array, int[] value, int[] index)
Inserts elements in an array at positions given by the index array and returns the expanded array.
insert
boolean[] insert(boolean[] array, boolean[] value, int[] index)
Inserts elements in an array at positions given by the index array and returns the expanded array.
append
String[] append(String[] array, String value)
Adds an element to the end of an array and returns the expanded array.
append
double[] append(double[] array, double value)
Adds an element to the end of an array and returns the expanded array.
append
int[] append(int[] array, int value)
Adds an element to the end of an array and returns the expanded array.
append
boolean[] append(boolean[] array, boolean value)
Adds an element to the end of an array and returns the expanded array.
append
String[] append(String[] array, String[] value)
Adds elements to the end of an array and returns the expanded array.
append
double[] append(double[] array, double[] value)
Adds elements to the end of an array and returns the expanded array.
append
int[] append(int[] array, int[] value)
Adds elements to the end of an array and returns the expanded array.
append
boolean[] append(boolean[] array, boolean[] value)
Adds elements to the end of an array and returns the expanded array.
remove
String[] remove(String[] array, int index)
Removes an element from an array and returns the shortened array.
remove
double[] remove(double[] array, int index)
Removes an element from an array and returns the shortened array.
remove
int[] remove(int[] array, int index)
Removes an element from an array and returns the shortened array.
remove
boolean[] remove(boolean[] array, int index)
Removes an element from an array and returns the shortened array.
remove
String[] remove(String[] array, int[] index)
Removes elements from an array and returns the shortened array.
remove
double[] remove(double[] array, int[] index)
Removes elements from an array and returns the shortened array.
remove
int[] remove(int[] array, int[] index)
Removes elements from an array and returns the shortened array.
remove
boolean[] remove(boolean[] array, int[] index)
Removes elements from an array and returns the shortened array.
insertRow
String[][] insertRow(String[][] matrix, String[] value, int rowIndex)
Inserts a row into a rectangular 2D array and returns the expanded array.
insertRow
double[][] insertRow(double[][] matrix, double[] value, int rowIndex)
Inserts a row into a rectangular 2D array and returns the expanded array.
insertRow
int[][] insertRow(int[][] matrix, int[] value, int rowIndex)
Inserts a row into a rectangular 2D array and returns the expanded array.
insertRow
boolean[][] insertRow(boolean[][] matrix, boolean[] value, int rowIndex)
Inserts a row into a rectangular 2D array and returns the expanded array.
insertRow
String[][] insertRow(String[][] matrix, String[][] value, int[] rowIndex)
Adds rows to a rectangular 2D array and returns the expanded array.
insertRow
double[][] insertRow(double[][] matrix, double[][] value, int[] rowIndex)
Adds rows to a rectangular 2D array and returns the expanded array.
insertRow
int[][] insertRow(int[][] matrix, int[][] value, int[] rowIndex)
Adds rows to a rectangular 2D array and returns the expanded array.
insertRow
boolean[][] insertRow(boolean[][] matrix, boolean[][] value, int[] rowIndex)
Adds rows to a rectangular 2D array and returns the expanded array.
replaceRow
String[][] replaceRow(String[][] matrix, String[] value, int rowIndex)
Replaces a row in a rectangular 2D array and returns the array.
replaceRow
double[][] replaceRow(double[][] matrix, double[] value, int rowIndex)
Replaces a row in a rectangular 2D array and returns the array.
replaceRow
int[][] replaceRow(int[][] matrix, int[] value, int rowIndex)
Replaces a row in a rectangular 2D array and returns the array.
replaceRow
boolean[][] replaceRow(boolean[][] matrix, boolean[] value, int rowIndex)
Replaces a row in a rectangular 2D array and returns the array.
replaceRow
String[][] replaceRow(String[][] matrix, String[][] value, int[] rowIndex)
Replaces rows in a rectangular 2D array and returns the array.
replaceRow
double[][] replaceRow(double[][] matrix, double[][] value, int[] rowIndex)
Replaces rows in a rectangular 2D array and returns the array.
replaceRow
int[][] replaceRow(int[][] matrix, int[][] value, int[] rowIndex)
Replaces rows in a rectangular 2D array and returns the array.
replaceRow
boolean[][] replaceRow(boolean[][] matrix, boolean[][] value, int[] rowIndex)
Replaces rows in a rectangular 2D array and returns the array.
appendRow
String[][] appendRow(String[][] matrix, String[] value)
Adds a row to the end of a rectangular 2D array and returns the expanded array.
appendRow
double[][] appendRow(double[][] matrix, double[] value)
Adds a row to the end of a rectangular 2D array and returns the expanded array.
appendRow
int[][] appendRow(int[][] matrix, int[] value)
Adds a row to the end of a rectangular 2D array and returns the expanded array.
appendRow
boolean[][] appendRow(boolean[][] matrix, boolean[] value)
Adds a row to the end of a rectangular 2D array and returns the expanded array.
appendRow
String[][] appendRow(String[][] matrix, String[][] value)
Adds rows to the end of a rectangular 2D array and returns the expanded array.
appendRow
double[][] appendRow(double[][] matrix, double[][] value)
Adds rows to the end of a rectangular 2D array and returns the expanded array.
appendRow
int[][] appendRow(int[][] matrix, int[][] value)
Adds rows to the end of a rectangular 2D array and returns the expanded array.
appendRow
boolean[][] appendRow(boolean[][] matrix, boolean[][] value)
Adds rows to the end of a rectangular 2D array and returns the expanded array.
removeRow
String[][] removeRow(String[][] matrix, int rowIndex)
Removes a row from a 2D array and returns the smaller array.
removeRow
double[][] removeRow(double[][] matrix, int rowIndex)
Removes a row from a 2D array and returns the smaller array.
removeRow
int[][] removeRow(int[][] matrix, int rowIndex)
Removes a row from a 2D array and returns the smaller array.
removeRow
boolean[][] removeRow(boolean[][] matrix, int rowIndex)
Removes a row from a 2D array and returns the smaller array.
removeRow
String[][] removeRow(String[][] matrix, int[] rowIndex)
Removes rows from a 2D array and returns the reduced array.
removeRow
double[][] removeRow(double[][] matrix, int[] rowIndex)
Removes rows from a 2D array and returns the reduced array.
removeRow
int[][] removeRow(int[][] matrix, int[] rowIndex)
Removes rows from a 2D array and returns the reduced array.
removeRow
boolean[][] removeRow(boolean[][] matrix, int[] rowIndex)
Removes rows from a 2D array and returns the reduced array.
insertColumn
String[][] insertColumn(String[][] matrix, String[] value, int columnIndex)
Adds a column into a rectangular 2D array and returns the expanded array.
insertColumn
double[][] insertColumn(double[][] matrix, double[] value, int columnIndex)
Adds a column into a rectangular 2D array and returns the expanded array.
insertColumn
int[][] insertColumn(int[][] matrix, int[] value, int columnIndex)
Adds a column into a rectangular 2D array and returns the expanded array.
insertColumn
boolean[][] insertColumn(boolean[][] matrix, boolean[] value, int columnIndex)
Adds a column into a rectangular 2D array and returns the expanded array.
insertColumn
String[][] insertColumn(String[][] matrix, String[][] value, int[] columnIndex)
Adds columns to a rectangular 2D array and returns the expanded array.
insertColumn
double[][] insertColumn(double[][] matrix, double[][] value, int[] columnIndex)
Adds columns to a rectangular 2D array and returns the expanded array.
insertColumn
int[][] insertColumn(int[][] matrix, int[][] value, int[] columnIndex)
Adds columns to a rectangular 2D array and returns the expanded array.
insertColumn
boolean[][] insertColumn(boolean[][] matrix, boolean[][] value, int[] columnIndex)
Adds columns to a rectangular 2D array and returns the expanded array.
replaceColumn
String[][] replaceColumn(String[][] matrix, String[] value, int columnIndex)
Replaces a column in a rectangular 2D array and returns the array.
replaceColumn
double[][] replaceColumn(double[][] matrix, double[] value, int columnIndex)
Replaces a column in a rectangular 2D array and returns the array.
replaceColumn
int[][] replaceColumn(int[][] matrix, int[] value, int columnIndex)
Replaces a column in a rectangular 2D array and returns the array.
replaceColumn
boolean[][] replaceColumn(boolean[][] matrix, boolean[] value, int columnIndex)
Replaces a column in a rectangular 2D array and returns the array.
replaceColumn
String[][] replaceColumn(String[][] matrix, String[][] value, int[] columnIndex)
Replaces columns in a rectangular 2D array and returns the array.
replaceColumn
double[][] replaceColumn(double[][] matrix, double[][] value, int[] columnIndex)
Replaces columns in a rectangular 2D array and returns the array.
replaceColumn
int[][] replaceColumn(int[][] matrix, int[][] value, int[] columnIndex)
Replaces columns in a rectangular 2D array and returns the array.
replaceColumn
boolean[][] replaceColumn(boolean[][] matrix, boolean[][] value, int[] columnIndex)
Replaces columns in a rectangular 2D array and returns the array.
appendColumn
String[][] appendColumn(String[][] matrix, String[] value)
Adds a column at the end of a rectangular 2D array and returns the expanded array.
appendColumn
double[][] appendColumn(double[][] matrix, double[] value)
Adds a column at the end of a rectangular 2D array and returns the expanded array.
appendColumn
int[][] appendColumn(int[][] matrix, int[] value)
Adds a column at the end of a rectangular 2D array and returns the expanded array.
appendColumn
boolean[][] appendColumn(boolean[][] matrix, boolean[] value)
Adds a column at the end of a rectangular 2D array and returns the expanded array.
appendColumn
String[][] appendColumn(String[][] matrix, String[][] value)
Adds columns to the end of a rectangular 2D array and returns the expanded array.
appendColumn
double[][] appendColumn(double[][] matrix, double[][] value)
Adds columns to the end of a rectangular 2D array and returns the expanded array.
appendColumn
int[][] appendColumn(int[][] matrix, int[][] value)
Adds columns to the end of a rectangular 2D array and returns the expanded array.
appendColumn
boolean[][] appendColumn(boolean[][] matrix, boolean[][] value)
Adds columns to the end of a rectangular 2D array and returns the expanded array.
removeColumn
String[][] removeColumn(String[][] matrix, int columnIndex)
Removes a column from a rectangular 2D array and returns the smaller array.
removeColumn
double[][] removeColumn(double[][] matrix, int columnIndex)
Removes a column from a rectangular 2D array and returns the smaller array.
removeColumn
int[][] removeColumn(int[][] matrix, int columnIndex)
Removes a column from a rectangular 2D array and returns the smaller array.
removeColumn
boolean[][] removeColumn(boolean[][] matrix, int columnIndex)
Removes a column from a rectangular 2D array and returns the smaller array.
removeColumn
String[][] removeColumn(String[][] matrix, int[] columnIndex)
Removes columns from a rectangular 2D array and returns the reduced array.
removeColumn
double[][] removeColumn(double[][] matrix, int[] columnIndex)
Removes columns from a rectangular 2D array and returns the reduced array.
removeColumn
int[][] removeColumn(int[][] matrix, int[] columnIndex)
Removes columns from a rectangular 2D array and returns the reduced array.
removeColumn
boolean[][] removeColumn(boolean[][] matrix, int[] columnIndex)
Removes columns from a rectangular 2D array and returns the reduced array.
matrixSize
int[] matrixSize(String[][] matrix)
Returns the number of rows and columns of a matrix as an integer array of length 2.
matrixSize
int[] matrixSize(double[][] matrix)
Returns the number of rows and columns of a matrix as an integer array of length 2.
matrixSize
int[] matrixSize(int[][] matrix)
Returns the number of rows and columns of a matrix as an integer array of length 2.
matrixSize
int[] matrixSize(boolean[][] matrix)
Returns the number of rows and columns of a matrix as an integer array of length 2.
transpose
String[][] transpose(String[][] matrix)
Returns the transpose of a matrix.
transpose
double[][] transpose(double[][] matrix)
Returns the transpose of a matrix.
transpose
int[][] transpose(int[][] matrix)
Returns the transpose of a matrix.
transpose
boolean[][] transpose(boolean[][] matrix)
Returns the transpose of a matrix.