26 #if defined (HAVE_CONFIG_H)
32 #include <type_traits>
63 if (c < 0 || c + a_len >
numel ())
64 (*current_liboctave_error_handler) (
"range error for insert");
98 if (c1 < 0 || c2 < 0 || c1 >=
len || c2 >=
len)
99 (*current_liboctave_error_handler) (
"range error for fill");
101 if (c1 > c2) { std::swap (c1, c2); }
121 retval.
insert (a, nc_insert);
146 if (c1 > c2) { std::swap (c1, c2); }
185 retval.
resize (a_nc, 0.0);
195 F77_XFCN (dgemv, DGEMV, (F77_CONST_CHAR_ARG2 (
"T", 1),
196 a_nr, a_nc, 1.0, a.
data (),
197 ld, v.
data (), 1, 0.0, y, 1
198 F77_CHAR_ARG_LEN (1)));
213 double res =
elem (0);
229 double res =
elem (0);
244 os <<
' ' << a.
elem (i);
290 typedef std::make_unsigned<octave_idx_type>::type unsigned_octave_idx_type;
292 unsigned_octave_idx_type
n = n_in;
296 retval.
xelem (0) = x1;
300 bool isnan_delta =
false;
301 double delta = (x2 - x1) / (
n - 1);
308 unsigned_octave_idx_type n2 =
n/2;
309 for (unsigned_octave_idx_type i = 1; i < n2; i++)
311 retval.
xelem (i) = x1 + i*delta;
312 retval.
xelem (
n-1-i) = x2 - i*delta;
317 retval.
xelem (n2) = 0;
318 else if (isnan_delta)
321 retval.
xelem (n2) = (x1 + x2) / 2;
T & elem(octave_idx_type n)
Size of the specified dimension.
T * fortran_vec()
Size of the specified dimension.
octave_idx_type rows() const
const double * data() const
octave_idx_type cols() const
double & xelem(octave_idx_type n)
octave_idx_type numel() const
Number of elements in the array.
MArray< T > transpose() const
bool operator==(const RowVector &a) const
ColumnVector transpose() const
bool operator!=(const RowVector &a) const
RowVector & insert(const RowVector &a, octave_idx_type c)
RowVector extract_n(octave_idx_type c1, octave_idx_type n) const
void clear(octave_idx_type n)
RowVector extract(octave_idx_type c1, octave_idx_type c2) const
RowVector & fill(double val)
RowVector append(const RowVector &a) const
void resize(octave_idx_type n, const double &rfv=0)
std::istream & operator>>(std::istream &is, RowVector &a)
RowVector imag(const ComplexRowVector &a)
std::ostream & operator<<(std::ostream &os, const RowVector &a)
RowVector linspace(double x1, double x2, octave_idx_type n_in)
RowVector real(const ComplexRowVector &a)
RowVector operator*(const RowVector &v, const Matrix &a)
#define F77_XFCN(f, F, args)
octave_f77_int_type F77_INT
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
bool mx_inline_equal(std::size_t n, const T1 *x, const T2 *y)
void mx_inline_real(std::size_t n, T *r, const std::complex< T > *x)
void mx_inline_imag(std::size_t n, T *r, const std::complex< T > *x)
std::complex< double > Complex
subroutine xddot(n, dx, incx, dy, incy, retval)
F77_RET_T F77_FUNC(xerbla, XERBLA)(F77_CONST_CHAR_ARG_DEF(s_arg