33#include <itpp/itexports.h>
63 for (
int j = 0;
j < m.cols();
j++) {
75 it_assert_debug(
usf >= 1,
"upsample: upsampling factor must be equal or greater than one");
96 it_assert_debug(
usf >= 1,
"upsample: upsampling factor must be equal or greater than one");
99 for (
int j = 0;
j <
v.cols();
j++)
100 u.set_col(
j*
usf,
v.get_col(
j));
116 it_assert_debug(
usf >= 1,
"lininterp: upsampling factor must be equal or greater than one");
117 int L = (m.cols() - 1) *
usf + 1;
119 for (
int i = 0;
i < m.rows();
i++) {
120 for (
int j = 0;
j < L - 1;
j++)
122 u(
i, L - 1) = m(
i, m.cols() - 1);
152 while (
i < cols - 1) {
154 for (
int j = 0;
j < rows;
j++) {
171 lininterp(m,
usf, u);
179 it_assert_debug(
usf >= 1,
"lininterp(): upsampling factor must be equal or greater than one");
182 for (
int j = 0;
j < L - 1;
j++) {
193 lininterp(
v,
usf, u);
222 while (
i <
len - 1) {
245ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT vec repeat(
const vec &v,
int norepeats);
247ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT cvec repeat(
const cvec &v,
int norepeats);
249ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT svec repeat(
const svec &v,
int norepeats);
251ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT ivec repeat(
const ivec &v,
int norepeats);
253ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT bvec repeat(
const bvec &v,
int norepeats);
256ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT mat repeat(
const mat &m,
int norepeats);
258ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT cmat repeat(
const cmat &m,
int norepeats);
260ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT smat repeat(
const smat &m,
int norepeats);
262ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT imat repeat(
const imat &m,
int norepeats);
264ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
bmat repeat(
const bmat &m,
int norepeats);
267ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT vec upsample(
const vec &v,
int usf);
269ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT cvec upsample(
const cvec &v,
int usf);
271ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT svec upsample(
const svec &v,
int usf);
273ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT ivec upsample(
const ivec &v,
int usf);
275ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT bvec upsample(
const bvec &v,
int usf);
278ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT mat upsample(
const mat &v,
int usf);
280ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT cmat upsample(
const cmat &v,
int usf);
282ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT smat upsample(
const smat &v,
int usf);
284ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT imat upsample(
const imat &v,
int usf);
286ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
bmat upsample(
const bmat &v,
int usf);
289ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const vec &v,
int usf, vec &u);
291ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const cvec &v,
int usf, cvec &u);
293ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const svec &v,
int usf, svec &u);
295ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const ivec &v,
int usf, ivec &u);
297ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const bvec &v,
int usf, bvec &u);
300ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const mat &v,
int usf, mat &u);
302ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const cmat &v,
int usf, cmat &u);
304ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const smat &v,
int usf, smat &u);
306ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const imat &v,
int usf, imat &u);
308ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void upsample(
const bmat &v,
int usf,
bmat &u);
311ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT vec lininterp(
const vec &v,
int usf);
313ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT cvec lininterp(
const cvec &v,
int usf);
316ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT mat lininterp(
const mat &v,
int usf);
318ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT cmat lininterp(
const cmat &v,
int usf);
321ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void lininterp(
const vec &v,
int usf, vec &u);
323ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void lininterp(
const cvec &v,
int usf, cvec &u);
326ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void lininterp(
const mat &v,
int usf, mat &u);
328ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT
void lininterp(
const cmat &v,
int usf, cmat &u);
331ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT mat lininterp(
const mat &m,
double f_base,
double f_ups,
int nrof_samples,
double t_start);
333ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT cmat lininterp(
const cmat &m,
double f_base,
double f_ups,
int nrof_samples,
double t_start);
336ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT vec lininterp(
const vec &v,
double f_base,
double f_ups,
int nrof_samples,
double t_start);
338ITPP_EXPORT_TEMPLATE
template ITPP_EXPORT cvec lininterp(
const cvec &v,
double f_base,
double f_ups,
int nrof_samples,
double t_start);
void set_size(int n, bool copy=false)
Resizing an Array<T>.
int length() const
Returns the number of data elements in the array object.
#define it_assert_debug(t, s)
Abort if t is not true and NDEBUG is not defined.
Matrix Class Definitions.
Mat< bin > bmat
bin matrix