GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
psi.cc File Reference
#include "ov.h"
#include "defun.h"
#include "error.h"
#include "dNDArray.h"
#include "fNDArray.h"
#include "lo-specfun.h"
Include dependency graph for psi.cc:

Go to the source code of this file.

Macros

#define FLOAT_BRANCH(T, A, M, E)
 
#define FLOAT_BRANCH(T, A, M, E)
 

Functions

OCTAVE_EXPORT octave_value_list Fpsi (const octave_value_list &args, int)
 

Macro Definition Documentation

◆ FLOAT_BRANCH [1/2]

#define FLOAT_BRANCH (   T,
  A,
  M,
 
)
Value:
if (oct_z.is_ ## T ##_type ()) \
{ \
const A ## NDArray z = oct_z.M ## array_value (); \
A ## NDArray psi_z (z.dims ()); \
\
const E *zv = z.data (); \
E *psi_zv = psi_z.fortran_vec (); \
const octave_idx_type n = z.numel (); \
for (octave_idx_type i = 0; i < n; i++) \
*psi_zv++ = math::psi (*zv++); \
\
retval = psi_z; \
}
F77_RET_T const F77_INT F77_CMPLX * A
double psi(double z)
Definition: lo-specfun.cc:2048
octave_idx_type n
Definition: mx-inlines.cc:753

◆ FLOAT_BRANCH [2/2]

#define FLOAT_BRANCH (   T,
  A,
  M,
 
)
Value:
if (oct_z.is_ ## T ##_type ()) \
{ \
const A ## NDArray z = oct_z.M ## array_value (); \
A ## NDArray psi_z (z.dims ()); \
\
const E *zv = z.data (); \
E *psi_zv = psi_z.fortran_vec (); \
const octave_idx_type n = z.numel (); \
for (octave_idx_type i = 0; i < n; i++) \
{ \
if (*zv < 0) \
error ("psi: Z must be non-negative for polygamma (K > 0)"); \
\
*psi_zv++ = math::psi (k, *zv++); \
} \
retval = psi_z; \
}

Function Documentation

◆ Fpsi()

OCTAVE_EXPORT octave_value_list Fpsi ( const octave_value_list args,
int   
)