mirror of
https://github.com/vale981/arb
synced 2025-03-04 17:01:40 -05:00
add arb_mat_indeterminate, acb_mat_indeterminate
This commit is contained in:
parent
9f1de7ecb8
commit
87857ace37
6 changed files with 56 additions and 0 deletions
|
@ -171,6 +171,8 @@ void acb_mat_one(acb_mat_t mat);
|
|||
|
||||
void acb_mat_ones(acb_mat_t mat);
|
||||
|
||||
void acb_mat_indeterminate(acb_mat_t mat);
|
||||
|
||||
void acb_mat_dft(acb_mat_t res, int kind, slong prec);
|
||||
|
||||
void acb_mat_transpose(acb_mat_t mat1, const acb_mat_t mat2);
|
||||
|
|
22
acb_mat/indeterminate.c
Normal file
22
acb_mat/indeterminate.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
Copyright (C) 2018 Fredrik Johansson
|
||||
|
||||
This file is part of Arb.
|
||||
|
||||
Arb is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License (LGPL) as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version. See <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "acb_mat.h"
|
||||
|
||||
void
|
||||
acb_mat_indeterminate(acb_mat_t A)
|
||||
{
|
||||
slong i, j;
|
||||
|
||||
for (i = 0; i < acb_mat_nrows(A); i++)
|
||||
for (j = 0; j < acb_mat_ncols(A); j++)
|
||||
acb_indeterminate(acb_mat_entry(A, i, j));
|
||||
}
|
|
@ -156,6 +156,8 @@ void arb_mat_one(arb_mat_t mat);
|
|||
|
||||
void arb_mat_ones(arb_mat_t mat);
|
||||
|
||||
void arb_mat_indeterminate(arb_mat_t mat);
|
||||
|
||||
void arb_mat_hilbert(arb_mat_t mat, slong prec);
|
||||
|
||||
void arb_mat_pascal(arb_mat_t mat, int triangular, slong prec);
|
||||
|
|
22
arb_mat/indeterminate.c
Normal file
22
arb_mat/indeterminate.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
Copyright (C) 2018 Fredrik Johansson
|
||||
|
||||
This file is part of Arb.
|
||||
|
||||
Arb is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License (LGPL) as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version. See <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "acb_mat.h"
|
||||
|
||||
void
|
||||
arb_mat_indeterminate(arb_mat_t A)
|
||||
{
|
||||
slong i, j;
|
||||
|
||||
for (i = 0; i < arb_mat_nrows(A); i++)
|
||||
for (j = 0; j < arb_mat_ncols(A); j++)
|
||||
arb_indeterminate(arb_mat_entry(A, i, j));
|
||||
}
|
|
@ -182,6 +182,10 @@ Special matrices
|
|||
|
||||
Sets all entries in the matrix to ones.
|
||||
|
||||
.. function:: void acb_mat_indeterminate(acb_mat_t mat)
|
||||
|
||||
Sets all entries in the matrix to indeterminate (NaN).
|
||||
|
||||
.. function:: void acb_mat_dft(acb_mat_t mat, int type, slong prec)
|
||||
|
||||
Sets *mat* to the DFT (discrete Fourier transform) matrix of order *n*
|
||||
|
|
|
@ -166,6 +166,10 @@ Special matrices
|
|||
|
||||
Sets all entries in the matrix to ones.
|
||||
|
||||
.. function:: void arb_mat_indeterminate(arb_mat_t mat)
|
||||
|
||||
Sets all entries in the matrix to indeterminate (NaN).
|
||||
|
||||
.. function:: void arb_mat_hilbert(arb_mat_t mat)
|
||||
|
||||
Sets *mat* to the Hilbert matrix, which has entries `A_{j,k} = 1/(j+k+1)`.
|
||||
|
|
Loading…
Add table
Reference in a new issue