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 (sgemv, SGEMV, (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 float res =
elem (0);
229 float 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 float 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 T * data() const
Size of the specified dimension.
octave_idx_type cols() const
T & xelem(octave_idx_type n)
Size of the specified dimension.
octave_idx_type numel() const
Number of elements in the array.
FloatRowVector extract_n(octave_idx_type c1, octave_idx_type n) const
FloatColumnVector transpose() const
FloatRowVector append(const FloatRowVector &a) const
bool operator!=(const FloatRowVector &a) const
bool operator==(const FloatRowVector &a) const
FloatRowVector & fill(float val)
void clear(octave_idx_type n)
FloatRowVector & insert(const FloatRowVector &a, octave_idx_type c)
FloatRowVector extract(octave_idx_type c1, octave_idx_type c2) const
void resize(octave_idx_type n, const float &rfv=0)
MArray< T > transpose() const
#define F77_XFCN(f, F, args)
octave_f77_int_type F77_INT
std::ostream & operator<<(std::ostream &os, const FloatRowVector &a)
FloatRowVector operator*(const FloatRowVector &v, const FloatMatrix &a)
FloatRowVector imag(const FloatComplexRowVector &a)
std::istream & operator>>(std::istream &is, FloatRowVector &a)
FloatRowVector real(const FloatComplexRowVector &a)
FloatRowVector linspace(float x1, float x2, octave_idx_type n_in)
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< float > FloatComplex
F77_RET_T F77_FUNC(xerbla, XERBLA)(F77_CONST_CHAR_ARG_DEF(s_arg
subroutine xsdot(n, dx, incx, dy, incy, retval)