24 #if defined (HAVE_CONFIG_H) 40 DEFUN (__pchip_deriv__, args, ,
49 bool rows = (
nargin == 3 && args(2).uint_value () == 2);
53 if (args(0).is_single_type () || args(1).is_single_type ())
61 error (
"__pchip_deriv__: X must be at least of length 2");
66 if (nx != (rows ? nyc : nyr))
67 error (
"__pchip_deriv__: X and Y dimension mismatch");
72 const F77_INT incfd = (rows ? octave::to_f77_int (nyr) : 1);
79 ymat.
data () +
k * inc,
86 error (
"__pchip_deriv__: PCHIM failed with ierr = %i",
ierr);
94 Matrix ymat (args(1).matrix_value ());
99 error (
"__pchip_deriv__: X must be at least of length 2");
104 if (nx != (rows ? nyc : nyr))
105 error (
"__pchip_deriv__: X and Y dimension mismatch");
110 const F77_INT incfd = (rows ? octave::to_f77_int (nyr) : 1);
117 ymat.
data () +
k * inc,
123 error (
"__pchip_deriv__: DPCHIM failed with ierr = %i",
ierr);
octave_idx_type rows(void) const
const T * data(void) const
const T * fortran_vec(void) const
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void error(const char *fmt,...)
octave_idx_type columns(void) const
#define F77_XFCN(f, F, args)
subroutine DPCHIM(N, X, F, D, INCFD, IERR)
subroutine PCHIM(N, X, F, D, INCFD, IERR)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE const F77_INT & incfd
octave_f77_int_type F77_INT
octave_idx_type numel(void) const
Number of elements in the array.
octave_idx_type length(void) const
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE const F77_INT F77_INT & ierr