ComplexRowVector

public final class ComplexRowVector extends ComplexMatrix

Represents a complex row vector. It is also a Matrix with shape 1 * length.

Parameters

data

must fit into the length of this vector.

Constructors

ComplexRowVector
Link copied to clipboard
ComplexRowVector ComplexRowVector(Integer length, Function1<Integer, ComplexDouble> lambda)
It is possible to set a value using lambda function.
ComplexRowVector
Link copied to clipboard
ComplexRowVector ComplexRowVector(Array<ComplexDouble> data)
If data is given, length is no longer necessary.
ComplexRowVector
Link copied to clipboard
ComplexRowVector ComplexRowVector(Integer length, Array<ComplexDouble> data)
Creates a new row vector.

Functions

addRow
Link copied to clipboard
final ComplexMatrix addRow(Integer srcRowIndex, Integer dstRowIndex, Number fraction)
Do a row addition transformation; add dstRow multiplied by fraction to srcRow.
adjoint
Link copied to clipboard
final ComplexMatrix adjoint()
Calculate adjoint matrix of this matrix.
columnWiseMean
Link copied to clipboard
final ComplexRowVector columnWiseMean()
Calculate the mean value of each column.
colVecNormSq
Link copied to clipboard
final ComplexRowVector colVecNormSq()
Calculate the squared norm of each column vector.
concat
Link copied to clipboard
final ComplexMatrix concat(ComplexMatrix other, Integer concatDim)
Concatenate to other matrix.
final ComplexTensor concat(ComplexTensor other, Integer concatDim)
Concatenate to other tensor.
conjTrans
Link copied to clipboard
ComplexMatrix conjTrans()
Calculate conjugate transpose of this matrix.
copy
Link copied to clipboard
ComplexRowVector copy()
crossProduct
Link copied to clipboard
final ComplexRowVector crossProduct(ComplexRowVector other)
Cross product.
div
Link copied to clipboard
ComplexRowVector div(ComplexDouble other)
ComplexRowVector div(Number other)
dotProduct
Link copied to clipboard
final ComplexDouble dotProduct(ComplexRowVector other)
Dot product.
final ComplexDouble dotProduct(ColumnVector other)
Dot product.
eltwiseMul
Link copied to clipboard
final ComplexMatrix eltwiseMul(ComplexMatrix other)
Element-wise multiplication.
final ComplexRowVector eltwiseMul(ComplexRowVector other)
equals
Link copied to clipboard
Boolean equals(Object other)
flatten
Link copied to clipboard
final ComplexTensor flatten()
Reshape to a 1-dimensional tensor.
frobeniusNormSquared
Link copied to clipboard
final Double frobeniusNormSquared()
Calculate squared frobenius norm.
get
Link copied to clipboard
final ComplexDouble get(Integer index)
final ComplexDouble get(IntArray indices)
final ComplexTensor get(Long indexLong)
final ComplexDouble get(Integer rowIndex, Integer colIndex)
getCols
Link copied to clipboard
final Integer getCols()
number of columns.
getData
Link copied to clipboard
final Array<ComplexDoublegetData()
must fit into the shape of this tensor.
getDim
Link copied to clipboard
final Integer getDim()
tensor dimension.
getLength
Link copied to clipboard
final Integer getLength()
length of a vector.
getRows
Link copied to clipboard
final Integer getRows()
number of rows.
getShape
Link copied to clipboard
final IntArray getShape()
tensor shape.
getSize
Link copied to clipboard
final Integer getSize()
getSubmatrix
Link copied to clipboard
ComplexMatrix getSubmatrix(Integer rowIndexStart, Integer rowIndexEnd, Integer colIndexStart, Integer colIndexEnd)
Get a submatrix by slicing this matrix.
getSubvector
Link copied to clipboard
final ComplexRowVector getSubvector(Integer indexStart, Integer indexEnd)
Get a subvector by slicing this vector.
map
Link copied to clipboard
ComplexRowVector map(Function1<ComplexDouble, ComplexDouble> lambda)
Same as Tensor.map but returns ComplexRowVector.
minorMatrix
Link copied to clipboard
final ComplexMatrix minorMatrix(Integer rowIndex, Integer colIndex)
Get a minor matrix.
minus
Link copied to clipboard
final ComplexMatrix minus(ComplexMatrix other)
final ComplexTensor minus(ComplexTensor other)
final ComplexRowVector minus(RowVector other)
plus
Link copied to clipboard
final ComplexMatrix plus(ComplexMatrix other)
final ComplexTensor plus(ComplexTensor other)
final ComplexRowVector plus(RowVector other)
pow
Link copied to clipboard
final ComplexMatrix pow(Integer n)
Calculate the nth power of this matrix.
pseudoEquals
Link copied to clipboard
final Boolean pseudoEquals(ComplexTensor other)
Determines if other is close enough to be said the same.
replicate
Link copied to clipboard
final ComplexMatrix replicate(Integer n)
Concatenate the copies of this vector n times.
reshape
Link copied to clipboard
final ComplexTensor reshape(IntArray newShape)
Reshape this tensor.
final ComplexMatrix reshape(Integer newRows, Integer newCols)
Reshape this matrix.
rowVecNormSq
Link copied to clipboard
final ComplexColumnVector rowVecNormSq()
Calculate the squared norm of each row vector.
rowWiseMean
Link copied to clipboard
final ComplexColumnVector rowWiseMean()
Calculate the mean value of each row.
set
Link copied to clipboard
final Unit set(Integer index, ComplexDouble value)
final Unit set(IntArray indices, ComplexDouble value)
final Unit set(Integer rowIndex, Integer colIndex, ComplexDouble value)
setSubmatrix
Link copied to clipboard
Unit setSubmatrix(Integer rowIndexStart, Integer rowIndexEnd, Integer colIndexStart, Integer colIndexEnd, ComplexMatrix other)
Set a submatrix by substituting other to desired position.
setSubvector
Link copied to clipboard
final Unit setSubvector(Integer indexStart, Integer indexEnd, ComplexRowVector other)
Set a subvector by substituting other to desired position.
sum
Link copied to clipboard
final ComplexDouble sum()
Calculate the sum of all values in this matrix.
switchRow
Link copied to clipboard
final ComplexMatrix switchRow(Integer rowIndex1, Integer rowIndex2)
Do a row switching transformation.
times
Link copied to clipboard
final ComplexColumnVector times(ComplexColumnVector other)
ComplexRowVector times(ComplexDouble other)
ComplexRowVector times(ComplexMatrix other)
final ComplexTensor times(ComplexTensor other)
ComplexRowVector times(Number other)
final ComplexColumnVector times(ColumnVector other)
toComplexColVector
Link copied to clipboard
final ComplexColumnVector toComplexColVector()
Downcast to ComplexColumnVector class if possible; i.e.
toComplexMatrix
Link copied to clipboard
final ComplexMatrix toComplexMatrix()
Downcast to ComplexMatrix class, if possible: i.e.
toComplexRowVector
Link copied to clipboard
final ComplexRowVector toComplexRowVector()
Downcast to ComplexRowVector class if possible; i.e.
toString
Link copied to clipboard
String toString()
trace
Link copied to clipboard
final ComplexDouble trace()
Calculate the trace of this matrix.
transpose
Link copied to clipboard
ComplexColumnVector transpose()
unaryMinus
Link copied to clipboard
ComplexRowVector unaryMinus()
unaryPlus
Link copied to clipboard
ComplexRowVector unaryPlus()

Properties

cols
Link copied to clipboard
private final Integer cols
number of columns.
data
Link copied to clipboard
private final Array<ComplexDoubledata
must fit into the shape of this tensor.
dim
Link copied to clipboard
private final Integer dim
tensor dimension.
length
Link copied to clipboard
private final Integer length
length of a vector.
rows
Link copied to clipboard
private final Integer rows
number of rows.
shape
Link copied to clipboard
private final IntArray shape
tensor shape.
size
Link copied to clipboard
private final Integer size