Skip to content

Commit

Permalink
update matrix generator comments
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed May 9, 2022
1 parent a4174ec commit f205b1d
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions core/test/utils/matrix_generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <numeric>
#include <random>
#include <type_traits>
#include <unordered_set>
#include <vector>


Expand Down Expand Up @@ -175,8 +174,7 @@ std::unique_ptr<MatrixType> generate_random_matrix(
* @tparam ValueDistribution type of value distribution
* @tparam Engine type of random engine
*
* @param num_rows number of rows
* @param num_cols number of columns
* @param size number of rows and columns
* @param ones_on_diagonal `true` generates only ones on the diagonal,
* `false` generates random values on the diagonal
* @param lower_triangular `true` generates a lower triangular matrix,
Expand Down Expand Up @@ -271,12 +269,21 @@ matrix_data<ValueType, IndexType> generate_random_triangular_matrix_data(
* @tparam MatrixType type of matrix to generate (must implement
* the interface `ReadableFromMatrixData<>` and provide
* matching `value_type` and `index_type` type aliases)
* @tparam NonzeroDistribution type of nonzero distribution
* @tparam ValueDistribution type of value distribution
* @tparam Engine type of random engine
*
* @param size number of rows and columns
* @param ones_on_diagonal `true` generates only ones on the diagonal,
* `false` generates random values on the diagonal
* @param lower_triangular `true` generates a lower triangular matrix,
* `false` an upper triangular matrix
* @param nonzero_dist distribution of nonzeros per row
* @param value_dist distribution of matrix values
* @param engine a random engine
* @param exec executor where the matrix should be allocated
* @param args additional arguments for the matrix constructor
*
* The other (template) parameters match generate_random_triangular_matrix_data.
*
* @return the unique pointer of MatrixType
*/
template <typename MatrixType = matrix::Dense<>, typename NonzeroDistribution,
Expand Down Expand Up @@ -309,8 +316,7 @@ std::unique_ptr<MatrixType> generate_random_triangular_matrix(
* @tparam Engine type of random engine
* @tparam MatrixArgs the arguments from the matrix to be forwarded.
*
* @param num_rows number of rows
* @param num_cols number of columns
* @param size number of rows and columns
* @param ones_on_diagonal `true` generates only ones on the diagonal,
* `false` generates random values on the diagonal
* @param nonzero_dist distribution of nonzeros per row
Expand Down Expand Up @@ -345,8 +351,7 @@ std::unique_ptr<MatrixType> generate_random_lower_triangular_matrix(
* @tparam Engine type of random engine
* @tparam MatrixArgs the arguments from the matrix to be forwarded.
*
* @param num_rows number of rows
* @param num_cols number of columns
* @param size number of rows and columns
* @param ones_on_diagonal `true` generates only ones on the diagonal,
* `false` generates random values on the diagonal
* @param nonzero_dist distribution of nonzeros per row
Expand Down

0 comments on commit f205b1d

Please sign in to comment.