Skip to content

Commit

Permalink
add descriptions to compute methods in Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
rala72 committed Jan 18, 2021
1 parent 79b9853 commit 0ba5cde
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/io/rala/math/algebra/matrix/Matrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ public T removeValue(long index) {
// region compute

/**
* computes a new value based on given operator
*
* @param row row where new value is computed
* @param col col where new value is computed
* @param operator operator to apply current value
Expand All @@ -356,6 +358,8 @@ public T compute(int row, int col, UnaryOperator<T> operator) {
}

/**
* computes a new value based on given operator
*
* @param index index where new value is computed
* @param operator operator to apply current value
* @return old value if existed or {@link #getDefaultValue()}
Expand All @@ -368,6 +372,8 @@ public T compute(long index, UnaryOperator<T> operator) {
}

/**
* computes a new value based on given operator
*
* @param row row where new value is computed
* @param col col where new value is computed
* @param value new value to use in computation
Expand All @@ -382,6 +388,8 @@ public T compute(int row, int col, T value, BinaryOperator<T> operator) {
}

/**
* computes a new value based on given operator
*
* @param index index where new value is computed
* @param value new value to use in computation
* @param operator operator to apply on old and new value
Expand All @@ -394,6 +402,8 @@ public T compute(long index, T value, BinaryOperator<T> operator) {
}

/**
* computes new values based on given operator
*
* @param operator operator to apply on all fields
* @see #setValue(long, Number)
*/
Expand All @@ -402,6 +412,8 @@ public void computeAll(Function<Field, T> operator) {
}

/**
* computes new values based on given operator
*
* @param value function returning new value to use in computation
* @param operator operator to apply on old and new value
* @see #computeAll(Function)
Expand Down

0 comments on commit 0ba5cde

Please sign in to comment.