├── .Rbuildignore
├── .aspell
├── RcppArmadillo.rds
└── defaults.R
├── .codecov.yml
├── .covrignore
├── .editorconfig
├── .gitattributes
├── .github
└── workflows
│ └── ci.yaml
├── .gitignore
├── ChangeLog
├── DESCRIPTION
├── NAMESPACE
├── R
├── RcppArmadillo.package.skeleton.R
├── RcppExports.R
├── SciPy2R.R
├── fastLm.R
├── flags.R
├── init.R
└── inline.R
├── README.md
├── cleanup
├── configure
├── configure.ac
├── inst
├── AUTHORS
├── CITATION
├── COPYRIGHTS
├── NEWS.Rd
├── announce
│ └── ANNOUNCE-0.2.0.txt
├── examples
│ ├── fastLm.r
│ ├── kalman
│ │ ├── FirstKalmanR.R
│ │ ├── Kalman.cpp
│ │ ├── KalmanR.R
│ │ ├── KalmanRimp.R
│ │ ├── benchmark.R
│ │ ├── firstExample.R
│ │ ├── kalmanExample.m
│ │ ├── kalmanM.m
│ │ ├── kalmanfilter.m
│ │ └── pos.txt
│ └── varSimulation.r
├── include
│ ├── README
│ ├── RcppArmadillo.h
│ ├── RcppArmadillo
│ │ ├── Alt_R_RNG.h
│ │ ├── Light
│ │ ├── Lighter
│ │ ├── Lightest
│ │ ├── RcppArmadillo
│ │ ├── config
│ │ │ ├── RcppArmadilloConfig.h
│ │ │ └── RcppArmadilloConfigGenerated.h.in
│ │ ├── interface
│ │ │ ├── RcppArmadilloAs.h
│ │ │ ├── RcppArmadilloForward.h
│ │ │ ├── RcppArmadilloSugar.h
│ │ │ └── RcppArmadilloWrap.h
│ │ ├── internal
│ │ │ ├── Col_meat.h
│ │ │ ├── Col_proto.h
│ │ │ ├── Mat_meat.h
│ │ │ ├── Mat_proto.h
│ │ │ ├── Row_meat.h
│ │ │ └── Row_proto.h
│ │ └── rng
│ │ │ └── Alt_R_RNG.h
│ ├── RcppArmadilloExtensions
│ │ ├── fixprob.h
│ │ ├── rmultinom.h
│ │ └── sample.h
│ ├── armadillo
│ └── armadillo_bits
│ │ ├── BaseCube_bones.hpp
│ │ ├── BaseCube_meat.hpp
│ │ ├── Base_bones.hpp
│ │ ├── Base_meat.hpp
│ │ ├── Col_bones.hpp
│ │ ├── Col_meat.hpp
│ │ ├── CubeToMatOp_bones.hpp
│ │ ├── CubeToMatOp_meat.hpp
│ │ ├── Cube_bones.hpp
│ │ ├── Cube_meat.hpp
│ │ ├── GenCube_bones.hpp
│ │ ├── GenCube_meat.hpp
│ │ ├── Gen_bones.hpp
│ │ ├── Gen_meat.hpp
│ │ ├── GlueCube_bones.hpp
│ │ ├── GlueCube_meat.hpp
│ │ ├── Glue_bones.hpp
│ │ ├── Glue_meat.hpp
│ │ ├── MapMat_bones.hpp
│ │ ├── MapMat_meat.hpp
│ │ ├── Mat_bones.hpp
│ │ ├── Mat_meat.hpp
│ │ ├── OpCube_bones.hpp
│ │ ├── OpCube_meat.hpp
│ │ ├── Op_bones.hpp
│ │ ├── Op_meat.hpp
│ │ ├── Proxy.hpp
│ │ ├── ProxyCube.hpp
│ │ ├── Row_bones.hpp
│ │ ├── Row_meat.hpp
│ │ ├── SizeCube_bones.hpp
│ │ ├── SizeCube_meat.hpp
│ │ ├── SizeMat_bones.hpp
│ │ ├── SizeMat_meat.hpp
│ │ ├── SpBase_bones.hpp
│ │ ├── SpBase_meat.hpp
│ │ ├── SpCol_bones.hpp
│ │ ├── SpCol_meat.hpp
│ │ ├── SpGlue_bones.hpp
│ │ ├── SpGlue_meat.hpp
│ │ ├── SpMat_bones.hpp
│ │ ├── SpMat_iterators_meat.hpp
│ │ ├── SpMat_meat.hpp
│ │ ├── SpOp_bones.hpp
│ │ ├── SpOp_meat.hpp
│ │ ├── SpProxy.hpp
│ │ ├── SpRow_bones.hpp
│ │ ├── SpRow_meat.hpp
│ │ ├── SpSubview_bones.hpp
│ │ ├── SpSubview_col_list_bones.hpp
│ │ ├── SpSubview_col_list_meat.hpp
│ │ ├── SpSubview_iterators_meat.hpp
│ │ ├── SpSubview_meat.hpp
│ │ ├── SpToDGlue_bones.hpp
│ │ ├── SpToDGlue_meat.hpp
│ │ ├── SpToDOp_bones.hpp
│ │ ├── SpToDOp_meat.hpp
│ │ ├── SpValProxy_bones.hpp
│ │ ├── SpValProxy_meat.hpp
│ │ ├── access.hpp
│ │ ├── arma_cmath.hpp
│ │ ├── arma_config.hpp
│ │ ├── arma_forward.hpp
│ │ ├── arma_ostream_bones.hpp
│ │ ├── arma_ostream_meat.hpp
│ │ ├── arma_rel_comparators.hpp
│ │ ├── arma_rng.hpp
│ │ ├── arma_rng_cxx03.hpp
│ │ ├── arma_static_check.hpp
│ │ ├── arma_str.hpp
│ │ ├── arma_version.hpp
│ │ ├── arrayops_bones.hpp
│ │ ├── arrayops_meat.hpp
│ │ ├── auxlib_bones.hpp
│ │ ├── auxlib_meat.hpp
│ │ ├── band_helper.hpp
│ │ ├── compiler_check.hpp
│ │ ├── compiler_setup.hpp
│ │ ├── compiler_setup_post.hpp
│ │ ├── cond_rel_bones.hpp
│ │ ├── cond_rel_meat.hpp
│ │ ├── config.hpp
│ │ ├── constants.hpp
│ │ ├── constants_old.hpp
│ │ ├── csv_name.hpp
│ │ ├── debug.hpp
│ │ ├── def_arpack.hpp
│ │ ├── def_atlas.hpp
│ │ ├── def_blas.hpp
│ │ ├── def_fftw3.hpp
│ │ ├── def_lapack.hpp
│ │ ├── def_superlu.hpp
│ │ ├── diagmat_proxy.hpp
│ │ ├── diagview_bones.hpp
│ │ ├── diagview_meat.hpp
│ │ ├── diskio_bones.hpp
│ │ ├── diskio_meat.hpp
│ │ ├── distr_param.hpp
│ │ ├── eGlueCube_bones.hpp
│ │ ├── eGlueCube_meat.hpp
│ │ ├── eGlue_bones.hpp
│ │ ├── eGlue_meat.hpp
│ │ ├── eOpCube_bones.hpp
│ │ ├── eOpCube_meat.hpp
│ │ ├── eOp_bones.hpp
│ │ ├── eOp_meat.hpp
│ │ ├── eglue_core_bones.hpp
│ │ ├── eglue_core_meat.hpp
│ │ ├── eop_aux.hpp
│ │ ├── eop_core_bones.hpp
│ │ ├── eop_core_meat.hpp
│ │ ├── fft_engine_fftw3.hpp
│ │ ├── fft_engine_kissfft.hpp
│ │ ├── field_bones.hpp
│ │ ├── field_meat.hpp
│ │ ├── fill.hpp
│ │ ├── fn_accu.hpp
│ │ ├── fn_all.hpp
│ │ ├── fn_any.hpp
│ │ ├── fn_approx_equal.hpp
│ │ ├── fn_as_scalar.hpp
│ │ ├── fn_chi2rnd.hpp
│ │ ├── fn_chol.hpp
│ │ ├── fn_clamp.hpp
│ │ ├── fn_cond_rcond.hpp
│ │ ├── fn_conv.hpp
│ │ ├── fn_conv_to.hpp
│ │ ├── fn_cor.hpp
│ │ ├── fn_cov.hpp
│ │ ├── fn_cross.hpp
│ │ ├── fn_cumprod.hpp
│ │ ├── fn_cumsum.hpp
│ │ ├── fn_det.hpp
│ │ ├── fn_diagmat.hpp
│ │ ├── fn_diags_spdiags.hpp
│ │ ├── fn_diagvec.hpp
│ │ ├── fn_diff.hpp
│ │ ├── fn_dot.hpp
│ │ ├── fn_eig_gen.hpp
│ │ ├── fn_eig_pair.hpp
│ │ ├── fn_eig_sym.hpp
│ │ ├── fn_eigs_gen.hpp
│ │ ├── fn_eigs_sym.hpp
│ │ ├── fn_elem.hpp
│ │ ├── fn_eps.hpp
│ │ ├── fn_expmat.hpp
│ │ ├── fn_eye.hpp
│ │ ├── fn_fft.hpp
│ │ ├── fn_fft2.hpp
│ │ ├── fn_find.hpp
│ │ ├── fn_find_unique.hpp
│ │ ├── fn_flip.hpp
│ │ ├── fn_hess.hpp
│ │ ├── fn_hist.hpp
│ │ ├── fn_histc.hpp
│ │ ├── fn_index_max.hpp
│ │ ├── fn_index_min.hpp
│ │ ├── fn_inplace_strans.hpp
│ │ ├── fn_inplace_trans.hpp
│ │ ├── fn_interp1.hpp
│ │ ├── fn_interp2.hpp
│ │ ├── fn_intersect.hpp
│ │ ├── fn_inv.hpp
│ │ ├── fn_inv_sympd.hpp
│ │ ├── fn_join.hpp
│ │ ├── fn_kmeans.hpp
│ │ ├── fn_kron.hpp
│ │ ├── fn_log_det.hpp
│ │ ├── fn_log_normpdf.hpp
│ │ ├── fn_logmat.hpp
│ │ ├── fn_lu.hpp
│ │ ├── fn_max.hpp
│ │ ├── fn_mean.hpp
│ │ ├── fn_median.hpp
│ │ ├── fn_min.hpp
│ │ ├── fn_misc.hpp
│ │ ├── fn_mvnrnd.hpp
│ │ ├── fn_n_unique.hpp
│ │ ├── fn_nonzeros.hpp
│ │ ├── fn_norm.hpp
│ │ ├── fn_normalise.hpp
│ │ ├── fn_normcdf.hpp
│ │ ├── fn_normpdf.hpp
│ │ ├── fn_numel.hpp
│ │ ├── fn_ones.hpp
│ │ ├── fn_orth_null.hpp
│ │ ├── fn_pinv.hpp
│ │ ├── fn_polyfit.hpp
│ │ ├── fn_polyval.hpp
│ │ ├── fn_powext.hpp
│ │ ├── fn_powmat.hpp
│ │ ├── fn_princomp.hpp
│ │ ├── fn_prod.hpp
│ │ ├── fn_qr.hpp
│ │ ├── fn_quantile.hpp
│ │ ├── fn_qz.hpp
│ │ ├── fn_randg.hpp
│ │ ├── fn_randi.hpp
│ │ ├── fn_randn.hpp
│ │ ├── fn_randperm.hpp
│ │ ├── fn_randu.hpp
│ │ ├── fn_range.hpp
│ │ ├── fn_rank.hpp
│ │ ├── fn_regspace.hpp
│ │ ├── fn_repelem.hpp
│ │ ├── fn_repmat.hpp
│ │ ├── fn_reshape.hpp
│ │ ├── fn_resize.hpp
│ │ ├── fn_reverse.hpp
│ │ ├── fn_roots.hpp
│ │ ├── fn_schur.hpp
│ │ ├── fn_shift.hpp
│ │ ├── fn_shuffle.hpp
│ │ ├── fn_size.hpp
│ │ ├── fn_solve.hpp
│ │ ├── fn_sort.hpp
│ │ ├── fn_sort_index.hpp
│ │ ├── fn_speye.hpp
│ │ ├── fn_spones.hpp
│ │ ├── fn_sprandn.hpp
│ │ ├── fn_sprandu.hpp
│ │ ├── fn_spsolve.hpp
│ │ ├── fn_sqrtmat.hpp
│ │ ├── fn_stddev.hpp
│ │ ├── fn_strans.hpp
│ │ ├── fn_sum.hpp
│ │ ├── fn_svd.hpp
│ │ ├── fn_svds.hpp
│ │ ├── fn_sylvester.hpp
│ │ ├── fn_symmat.hpp
│ │ ├── fn_toeplitz.hpp
│ │ ├── fn_trace.hpp
│ │ ├── fn_trans.hpp
│ │ ├── fn_trapz.hpp
│ │ ├── fn_trig.hpp
│ │ ├── fn_trimat.hpp
│ │ ├── fn_trimat_ind.hpp
│ │ ├── fn_trunc_exp.hpp
│ │ ├── fn_trunc_log.hpp
│ │ ├── fn_unique.hpp
│ │ ├── fn_var.hpp
│ │ ├── fn_vecnorm.hpp
│ │ ├── fn_vectorise.hpp
│ │ ├── fn_wishrnd.hpp
│ │ ├── fn_zeros.hpp
│ │ ├── glue_affmul_bones.hpp
│ │ ├── glue_affmul_meat.hpp
│ │ ├── glue_atan2_bones.hpp
│ │ ├── glue_atan2_meat.hpp
│ │ ├── glue_conv_bones.hpp
│ │ ├── glue_conv_meat.hpp
│ │ ├── glue_cor_bones.hpp
│ │ ├── glue_cor_meat.hpp
│ │ ├── glue_cov_bones.hpp
│ │ ├── glue_cov_meat.hpp
│ │ ├── glue_cross_bones.hpp
│ │ ├── glue_cross_meat.hpp
│ │ ├── glue_hist_bones.hpp
│ │ ├── glue_hist_meat.hpp
│ │ ├── glue_histc_bones.hpp
│ │ ├── glue_histc_meat.hpp
│ │ ├── glue_hypot_bones.hpp
│ │ ├── glue_hypot_meat.hpp
│ │ ├── glue_intersect_bones.hpp
│ │ ├── glue_intersect_meat.hpp
│ │ ├── glue_join_bones.hpp
│ │ ├── glue_join_meat.hpp
│ │ ├── glue_kron_bones.hpp
│ │ ├── glue_kron_meat.hpp
│ │ ├── glue_max_bones.hpp
│ │ ├── glue_max_meat.hpp
│ │ ├── glue_min_bones.hpp
│ │ ├── glue_min_meat.hpp
│ │ ├── glue_mixed_bones.hpp
│ │ ├── glue_mixed_meat.hpp
│ │ ├── glue_mvnrnd_bones.hpp
│ │ ├── glue_mvnrnd_meat.hpp
│ │ ├── glue_polyfit_bones.hpp
│ │ ├── glue_polyfit_meat.hpp
│ │ ├── glue_polyval_bones.hpp
│ │ ├── glue_polyval_meat.hpp
│ │ ├── glue_powext_bones.hpp
│ │ ├── glue_powext_meat.hpp
│ │ ├── glue_quantile_bones.hpp
│ │ ├── glue_quantile_meat.hpp
│ │ ├── glue_relational_bones.hpp
│ │ ├── glue_relational_meat.hpp
│ │ ├── glue_solve_bones.hpp
│ │ ├── glue_solve_meat.hpp
│ │ ├── glue_times_bones.hpp
│ │ ├── glue_times_meat.hpp
│ │ ├── glue_times_misc_bones.hpp
│ │ ├── glue_times_misc_meat.hpp
│ │ ├── glue_toeplitz_bones.hpp
│ │ ├── glue_toeplitz_meat.hpp
│ │ ├── glue_trapz_bones.hpp
│ │ ├── glue_trapz_meat.hpp
│ │ ├── gmm_diag_bones.hpp
│ │ ├── gmm_diag_meat.hpp
│ │ ├── gmm_full_bones.hpp
│ │ ├── gmm_full_meat.hpp
│ │ ├── gmm_misc_bones.hpp
│ │ ├── gmm_misc_meat.hpp
│ │ ├── hdf5_misc.hpp
│ │ ├── hdf5_name.hpp
│ │ ├── include_hdf5.hpp
│ │ ├── include_superlu.hpp
│ │ ├── injector_bones.hpp
│ │ ├── injector_meat.hpp
│ │ ├── memory.hpp
│ │ ├── mp_misc.hpp
│ │ ├── mtGlueCube_bones.hpp
│ │ ├── mtGlueCube_meat.hpp
│ │ ├── mtGlue_bones.hpp
│ │ ├── mtGlue_meat.hpp
│ │ ├── mtOpCube_bones.hpp
│ │ ├── mtOpCube_meat.hpp
│ │ ├── mtOp_bones.hpp
│ │ ├── mtOp_meat.hpp
│ │ ├── mtSpGlue_bones.hpp
│ │ ├── mtSpGlue_meat.hpp
│ │ ├── mtSpOp_bones.hpp
│ │ ├── mtSpOp_meat.hpp
│ │ ├── mtSpReduceOp_bones.hpp
│ │ ├── mtSpReduceOp_meat.hpp
│ │ ├── mul_gemm.hpp
│ │ ├── mul_gemm_mixed.hpp
│ │ ├── mul_gemv.hpp
│ │ ├── mul_herk.hpp
│ │ ├── mul_syrk.hpp
│ │ ├── newarp_DenseGenMatProd_bones.hpp
│ │ ├── newarp_DenseGenMatProd_meat.hpp
│ │ ├── newarp_DoubleShiftQR_bones.hpp
│ │ ├── newarp_DoubleShiftQR_meat.hpp
│ │ ├── newarp_EigsSelect.hpp
│ │ ├── newarp_GenEigsSolver_bones.hpp
│ │ ├── newarp_GenEigsSolver_meat.hpp
│ │ ├── newarp_SortEigenvalue.hpp
│ │ ├── newarp_SparseGenMatProd_bones.hpp
│ │ ├── newarp_SparseGenMatProd_meat.hpp
│ │ ├── newarp_SparseGenRealShiftSolve_bones.hpp
│ │ ├── newarp_SparseGenRealShiftSolve_meat.hpp
│ │ ├── newarp_SymEigsShiftSolver_bones.hpp
│ │ ├── newarp_SymEigsShiftSolver_meat.hpp
│ │ ├── newarp_SymEigsSolver_bones.hpp
│ │ ├── newarp_SymEigsSolver_meat.hpp
│ │ ├── newarp_TridiagEigen_bones.hpp
│ │ ├── newarp_TridiagEigen_meat.hpp
│ │ ├── newarp_UpperHessenbergEigen_bones.hpp
│ │ ├── newarp_UpperHessenbergEigen_meat.hpp
│ │ ├── newarp_UpperHessenbergQR_bones.hpp
│ │ ├── newarp_UpperHessenbergQR_meat.hpp
│ │ ├── newarp_cx_attrib.hpp
│ │ ├── op_all_bones.hpp
│ │ ├── op_all_meat.hpp
│ │ ├── op_any_bones.hpp
│ │ ├── op_any_meat.hpp
│ │ ├── op_chi2rnd_bones.hpp
│ │ ├── op_chi2rnd_meat.hpp
│ │ ├── op_chol_bones.hpp
│ │ ├── op_chol_meat.hpp
│ │ ├── op_clamp_bones.hpp
│ │ ├── op_clamp_meat.hpp
│ │ ├── op_col_as_mat_bones.hpp
│ │ ├── op_col_as_mat_meat.hpp
│ │ ├── op_cond_bones.hpp
│ │ ├── op_cond_meat.hpp
│ │ ├── op_cor_bones.hpp
│ │ ├── op_cor_meat.hpp
│ │ ├── op_cov_bones.hpp
│ │ ├── op_cov_meat.hpp
│ │ ├── op_cumprod_bones.hpp
│ │ ├── op_cumprod_meat.hpp
│ │ ├── op_cumsum_bones.hpp
│ │ ├── op_cumsum_meat.hpp
│ │ ├── op_cx_scalar_bones.hpp
│ │ ├── op_cx_scalar_meat.hpp
│ │ ├── op_det_bones.hpp
│ │ ├── op_det_meat.hpp
│ │ ├── op_diagmat_bones.hpp
│ │ ├── op_diagmat_meat.hpp
│ │ ├── op_diagvec_bones.hpp
│ │ ├── op_diagvec_meat.hpp
│ │ ├── op_diff_bones.hpp
│ │ ├── op_diff_meat.hpp
│ │ ├── op_dot_bones.hpp
│ │ ├── op_dot_meat.hpp
│ │ ├── op_dotext_bones.hpp
│ │ ├── op_dotext_meat.hpp
│ │ ├── op_expmat_bones.hpp
│ │ ├── op_expmat_meat.hpp
│ │ ├── op_fft_bones.hpp
│ │ ├── op_fft_meat.hpp
│ │ ├── op_find_bones.hpp
│ │ ├── op_find_meat.hpp
│ │ ├── op_find_unique_bones.hpp
│ │ ├── op_find_unique_meat.hpp
│ │ ├── op_flip_bones.hpp
│ │ ├── op_flip_meat.hpp
│ │ ├── op_hist_bones.hpp
│ │ ├── op_hist_meat.hpp
│ │ ├── op_htrans_bones.hpp
│ │ ├── op_htrans_meat.hpp
│ │ ├── op_index_max_bones.hpp
│ │ ├── op_index_max_meat.hpp
│ │ ├── op_index_min_bones.hpp
│ │ ├── op_index_min_meat.hpp
│ │ ├── op_inv_gen_bones.hpp
│ │ ├── op_inv_gen_meat.hpp
│ │ ├── op_inv_spd_bones.hpp
│ │ ├── op_inv_spd_meat.hpp
│ │ ├── op_log_det_bones.hpp
│ │ ├── op_log_det_meat.hpp
│ │ ├── op_logmat_bones.hpp
│ │ ├── op_logmat_meat.hpp
│ │ ├── op_max_bones.hpp
│ │ ├── op_max_meat.hpp
│ │ ├── op_mean_bones.hpp
│ │ ├── op_mean_meat.hpp
│ │ ├── op_median_bones.hpp
│ │ ├── op_median_meat.hpp
│ │ ├── op_min_bones.hpp
│ │ ├── op_min_meat.hpp
│ │ ├── op_misc_bones.hpp
│ │ ├── op_misc_meat.hpp
│ │ ├── op_nonzeros_bones.hpp
│ │ ├── op_nonzeros_meat.hpp
│ │ ├── op_norm2est_bones.hpp
│ │ ├── op_norm2est_meat.hpp
│ │ ├── op_norm_bones.hpp
│ │ ├── op_norm_meat.hpp
│ │ ├── op_normalise_bones.hpp
│ │ ├── op_normalise_meat.hpp
│ │ ├── op_orth_null_bones.hpp
│ │ ├── op_orth_null_meat.hpp
│ │ ├── op_pinv_bones.hpp
│ │ ├── op_pinv_meat.hpp
│ │ ├── op_powmat_bones.hpp
│ │ ├── op_powmat_meat.hpp
│ │ ├── op_princomp_bones.hpp
│ │ ├── op_princomp_meat.hpp
│ │ ├── op_prod_bones.hpp
│ │ ├── op_prod_meat.hpp
│ │ ├── op_range_bones.hpp
│ │ ├── op_range_meat.hpp
│ │ ├── op_rank_bones.hpp
│ │ ├── op_rank_meat.hpp
│ │ ├── op_rcond_bones.hpp
│ │ ├── op_rcond_meat.hpp
│ │ ├── op_relational_bones.hpp
│ │ ├── op_relational_meat.hpp
│ │ ├── op_repelem_bones.hpp
│ │ ├── op_repelem_meat.hpp
│ │ ├── op_repmat_bones.hpp
│ │ ├── op_repmat_meat.hpp
│ │ ├── op_reshape_bones.hpp
│ │ ├── op_reshape_meat.hpp
│ │ ├── op_resize_bones.hpp
│ │ ├── op_resize_meat.hpp
│ │ ├── op_reverse_bones.hpp
│ │ ├── op_reverse_meat.hpp
│ │ ├── op_roots_bones.hpp
│ │ ├── op_roots_meat.hpp
│ │ ├── op_row_as_mat_bones.hpp
│ │ ├── op_row_as_mat_meat.hpp
│ │ ├── op_shift_bones.hpp
│ │ ├── op_shift_meat.hpp
│ │ ├── op_shuffle_bones.hpp
│ │ ├── op_shuffle_meat.hpp
│ │ ├── op_sort_bones.hpp
│ │ ├── op_sort_index_bones.hpp
│ │ ├── op_sort_index_meat.hpp
│ │ ├── op_sort_meat.hpp
│ │ ├── op_sp_as_dense_bones.hpp
│ │ ├── op_sp_as_dense_meat.hpp
│ │ ├── op_sp_diagvec_bones.hpp
│ │ ├── op_sp_diagvec_meat.hpp
│ │ ├── op_sp_max_bones.hpp
│ │ ├── op_sp_max_meat.hpp
│ │ ├── op_sp_mean_bones.hpp
│ │ ├── op_sp_mean_meat.hpp
│ │ ├── op_sp_min_bones.hpp
│ │ ├── op_sp_min_meat.hpp
│ │ ├── op_sp_minus_bones.hpp
│ │ ├── op_sp_minus_meat.hpp
│ │ ├── op_sp_nonzeros_bones.hpp
│ │ ├── op_sp_nonzeros_meat.hpp
│ │ ├── op_sp_plus_bones.hpp
│ │ ├── op_sp_plus_meat.hpp
│ │ ├── op_sp_stddev_bones.hpp
│ │ ├── op_sp_stddev_meat.hpp
│ │ ├── op_sp_sum_bones.hpp
│ │ ├── op_sp_sum_meat.hpp
│ │ ├── op_sp_var_bones.hpp
│ │ ├── op_sp_var_meat.hpp
│ │ ├── op_sp_vecnorm_bones.hpp
│ │ ├── op_sp_vecnorm_meat.hpp
│ │ ├── op_sqrtmat_bones.hpp
│ │ ├── op_sqrtmat_meat.hpp
│ │ ├── op_stddev_bones.hpp
│ │ ├── op_stddev_meat.hpp
│ │ ├── op_strans_bones.hpp
│ │ ├── op_strans_meat.hpp
│ │ ├── op_sum_bones.hpp
│ │ ├── op_sum_meat.hpp
│ │ ├── op_symmat_bones.hpp
│ │ ├── op_symmat_meat.hpp
│ │ ├── op_toeplitz_bones.hpp
│ │ ├── op_toeplitz_meat.hpp
│ │ ├── op_trimat_bones.hpp
│ │ ├── op_trimat_meat.hpp
│ │ ├── op_unique_bones.hpp
│ │ ├── op_unique_meat.hpp
│ │ ├── op_var_bones.hpp
│ │ ├── op_var_meat.hpp
│ │ ├── op_vecnorm_bones.hpp
│ │ ├── op_vecnorm_meat.hpp
│ │ ├── op_vectorise_bones.hpp
│ │ ├── op_vectorise_meat.hpp
│ │ ├── op_wishrnd_bones.hpp
│ │ ├── op_wishrnd_meat.hpp
│ │ ├── operator_cube_div.hpp
│ │ ├── operator_cube_minus.hpp
│ │ ├── operator_cube_plus.hpp
│ │ ├── operator_cube_relational.hpp
│ │ ├── operator_cube_schur.hpp
│ │ ├── operator_cube_times.hpp
│ │ ├── operator_div.hpp
│ │ ├── operator_minus.hpp
│ │ ├── operator_ostream.hpp
│ │ ├── operator_plus.hpp
│ │ ├── operator_relational.hpp
│ │ ├── operator_schur.hpp
│ │ ├── operator_times.hpp
│ │ ├── podarray_bones.hpp
│ │ ├── podarray_meat.hpp
│ │ ├── promote_type.hpp
│ │ ├── restrictors.hpp
│ │ ├── running_stat_bones.hpp
│ │ ├── running_stat_meat.hpp
│ │ ├── running_stat_vec_bones.hpp
│ │ ├── running_stat_vec_meat.hpp
│ │ ├── sp_auxlib_bones.hpp
│ │ ├── sp_auxlib_meat.hpp
│ │ ├── span.hpp
│ │ ├── spdiagview_bones.hpp
│ │ ├── spdiagview_meat.hpp
│ │ ├── spglue_join_bones.hpp
│ │ ├── spglue_join_meat.hpp
│ │ ├── spglue_kron_bones.hpp
│ │ ├── spglue_kron_meat.hpp
│ │ ├── spglue_max_bones.hpp
│ │ ├── spglue_max_meat.hpp
│ │ ├── spglue_merge_bones.hpp
│ │ ├── spglue_merge_meat.hpp
│ │ ├── spglue_min_bones.hpp
│ │ ├── spglue_min_meat.hpp
│ │ ├── spglue_minus_bones.hpp
│ │ ├── spglue_minus_meat.hpp
│ │ ├── spglue_plus_bones.hpp
│ │ ├── spglue_plus_meat.hpp
│ │ ├── spglue_relational_bones.hpp
│ │ ├── spglue_relational_meat.hpp
│ │ ├── spglue_schur_bones.hpp
│ │ ├── spglue_schur_meat.hpp
│ │ ├── spglue_times_bones.hpp
│ │ ├── spglue_times_meat.hpp
│ │ ├── spop_diagmat_bones.hpp
│ │ ├── spop_diagmat_meat.hpp
│ │ ├── spop_htrans_bones.hpp
│ │ ├── spop_htrans_meat.hpp
│ │ ├── spop_misc_bones.hpp
│ │ ├── spop_misc_meat.hpp
│ │ ├── spop_norm_bones.hpp
│ │ ├── spop_norm_meat.hpp
│ │ ├── spop_normalise_bones.hpp
│ │ ├── spop_normalise_meat.hpp
│ │ ├── spop_relational_bones.hpp
│ │ ├── spop_relational_meat.hpp
│ │ ├── spop_repmat_bones.hpp
│ │ ├── spop_repmat_meat.hpp
│ │ ├── spop_reverse_bones.hpp
│ │ ├── spop_reverse_meat.hpp
│ │ ├── spop_shift_bones.hpp
│ │ ├── spop_shift_meat.hpp
│ │ ├── spop_strans_bones.hpp
│ │ ├── spop_strans_meat.hpp
│ │ ├── spop_symmat_bones.hpp
│ │ ├── spop_symmat_meat.hpp
│ │ ├── spop_trimat_bones.hpp
│ │ ├── spop_trimat_meat.hpp
│ │ ├── spop_vectorise_bones.hpp
│ │ ├── spop_vectorise_meat.hpp
│ │ ├── spsolve_factoriser_bones.hpp
│ │ ├── spsolve_factoriser_meat.hpp
│ │ ├── strip.hpp
│ │ ├── subview_bones.hpp
│ │ ├── subview_cube_bones.hpp
│ │ ├── subview_cube_each_bones.hpp
│ │ ├── subview_cube_each_meat.hpp
│ │ ├── subview_cube_meat.hpp
│ │ ├── subview_cube_slices_bones.hpp
│ │ ├── subview_cube_slices_meat.hpp
│ │ ├── subview_each_bones.hpp
│ │ ├── subview_each_meat.hpp
│ │ ├── subview_elem1_bones.hpp
│ │ ├── subview_elem1_meat.hpp
│ │ ├── subview_elem2_bones.hpp
│ │ ├── subview_elem2_meat.hpp
│ │ ├── subview_field_bones.hpp
│ │ ├── subview_field_meat.hpp
│ │ ├── subview_meat.hpp
│ │ ├── sym_helper.hpp
│ │ ├── traits.hpp
│ │ ├── translate_arpack.hpp
│ │ ├── translate_atlas.hpp
│ │ ├── translate_blas.hpp
│ │ ├── translate_fftw3.hpp
│ │ ├── translate_lapack.hpp
│ │ ├── translate_superlu.hpp
│ │ ├── trimat_helper.hpp
│ │ ├── typedef_elem.hpp
│ │ ├── typedef_elem_check.hpp
│ │ ├── typedef_mat.hpp
│ │ ├── typedef_mat_fixed.hpp
│ │ ├── unwrap.hpp
│ │ ├── unwrap_cube.hpp
│ │ ├── unwrap_spmat.hpp
│ │ ├── upgrade_val.hpp
│ │ ├── wall_clock_bones.hpp
│ │ ├── wall_clock_meat.hpp
│ │ ├── xtrans_mat_bones.hpp
│ │ ├── xtrans_mat_meat.hpp
│ │ ├── xvec_htrans_bones.hpp
│ │ └── xvec_htrans_meat.hpp
├── skeleton
│ ├── Makevars
│ ├── Makevars.win
│ ├── rcpparma_hello_world.Rd
│ └── rcpparma_hello_world.cpp
└── tinytest
│ ├── cpp
│ ├── Rlapack.cpp
│ ├── any_as_vec.cpp
│ ├── armadillo.cpp
│ ├── colrow_as_vec.cpp
│ ├── complex.cpp
│ ├── cube.cpp
│ ├── fields.cpp
│ ├── fields_new.cpp
│ ├── rmultinom.cpp
│ ├── rng.cpp
│ ├── sample.cpp
│ └── sparse.cpp
│ ├── test_Rlapack.R
│ ├── test_complex.R
│ ├── test_cube.R
│ ├── test_fastLm.R
│ ├── test_fields.R
│ ├── test_fields_new.R
│ ├── test_misc.R
│ ├── test_rcpparmadillo.R
│ ├── test_rmultinom.R
│ ├── test_rng.R
│ ├── test_sample.R
│ ├── test_scipy2r.R
│ ├── test_sparse.R
│ └── test_sparseConversion.R
├── local
├── RcppArmadillo-unitTests.Rnw
├── armafield.cpp
└── rcpparma375.cpp
├── man
├── RcppArmadillo-package.Rd
├── RcppArmadillo.package.skeleton.Rd
├── armadillo_get_number_of_omp_threads.Rd
├── armadillo_set_seed.Rd
├── armadillo_set_seed_random.Rd
├── armadillo_throttle_cores.Rd
├── armadillo_version.Rd
└── fastLm.Rd
├── src
├── Makevars.in
├── Makevars.win
├── RcppArmadillo.cpp
├── RcppExports.cpp
└── fastLm.cpp
├── tests
└── tinytest.R
└── vignettes
├── RcppArmadillo-intro.Rnw
├── RcppArmadillo-sparseMatrix.Rnw
├── pdf
├── RcppArmadillo-intro.pdf
└── RcppArmadillo-sparseMatrix.pdf
└── rmd
├── Makefile
├── RcppArmadillo-intro.Rnw
├── RcppArmadillo-sparseMatrix.Rmd
├── RcppArmadillo.bib
├── elsarticle-harv.bst
├── elsarticle.cls
└── kalmanExample.pdf
/.Rbuildignore:
--------------------------------------------------------------------------------
1 | debian
2 | \.travis\.yml
3 | \.git
4 | src/lapack
5 | ^.*\.Rproj$
6 | ^\.Rproj\.user$
7 | ^.*\.tar\.gz$
8 | ^local
9 | ^vignettes/rmd
10 | ^.editorconfig
11 | ^\.github
12 | ^\.codecov.yml
13 | ^\.covrignore
14 | ^GPATH
15 | ^GRTAGS
16 | ^GTAGS
17 | ^inst/include/armadillo_bits/config.hpp.cmake
18 |
--------------------------------------------------------------------------------
/.aspell/RcppArmadillo.rds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RcppCore/RcppArmadillo/66dcdb5e878b391cd44a8c2854898abd002272ed/.aspell/RcppArmadillo.rds
--------------------------------------------------------------------------------
/.aspell/defaults.R:
--------------------------------------------------------------------------------
1 | Rd_files <- vignettes <- R_files <- description <-
2 | list(encoding = "UTF-8",
3 | language = "en",
4 | dictionaries = c("en_stats", "RcppArmadillo"))
5 |
--------------------------------------------------------------------------------
/.codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | precision: 1
3 |
4 | status:
5 | project:
6 | default:
7 | target: 70% # the (on purpose low) required coverage value
8 | threshold: 2% # the permitted delta in hitting the target
9 | patch:
10 | default:
11 | target: 0% # the (on purpose low) required coverage value
12 |
13 | comment: false
14 |
15 | ignore:
16 | - "inst/include/armadillo"
17 | - "inst/include/armadillo_bits"
18 |
--------------------------------------------------------------------------------
/.covrignore:
--------------------------------------------------------------------------------
1 | inst/include/armadillo_bits/*
2 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: http://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [*]
8 | end_of_line = lf
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | # Matches multiple files with brace expansion notation
13 | # 4 space indentation
14 | [*.{c,cpp,h,hpp,R,r}]
15 | indent_style = space
16 | indent_size = 4
17 |
18 | # Tab indentation (no size specified)
19 | [Makefile]
20 | indent_style = tab
21 |
22 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | DESCRIPTION merge=union
2 | ChangeLog merge=union
3 | inst/NEWS.Rd merge=union
4 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yaml:
--------------------------------------------------------------------------------
1 | # Run CI for R using https://eddelbuettel.github.io/r-ci/
2 |
3 | name: ci
4 |
5 | on:
6 | push:
7 | pull_request:
8 |
9 | env:
10 | _R_CHECK_FORCE_SUGGESTS_: "false"
11 |
12 | jobs:
13 | ci:
14 | strategy:
15 | matrix:
16 | include:
17 | #- {os: macOS-latest}
18 | - {os: ubuntu-latest}
19 |
20 | runs-on: ${{ matrix.os }}
21 |
22 | steps:
23 | - name: Checkout
24 | uses: actions/checkout@v4
25 |
26 | - name: Setup
27 | uses: eddelbuettel/github-actions/r-ci@master
28 |
29 | - name: Dependencies
30 | run: ./run.sh install_deps
31 |
32 | - name: Test
33 | run: ./run.sh run_tests
34 |
35 | - name: Coverage
36 | if: ${{ matrix.os == 'ubuntu-latest' }}
37 | run: ./run.sh coverage
38 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .Rproj.user
2 | .Rhistory
3 | .RData
4 | inst/include/RcppArmadilloConfigGenerated.h
5 | src/Makevars
6 | src/*.o
7 | src/*.so
8 | src/*.dll
9 | *tar.gz
10 | local/*
11 | GPATH
12 | GRTAGS
13 | GTAGS
14 | inst/include/armadillo_bits/config.hpp.cmake
15 |
--------------------------------------------------------------------------------
/NAMESPACE:
--------------------------------------------------------------------------------
1 | useDynLib("RcppArmadillo", .registration=TRUE)
2 |
3 | importFrom("Rcpp", "evalCpp", "sourceCpp")
4 | importFrom("stats", "coef", "fitted", "model.frame", "model.matrix", "model.response", "printCoefmat", "pt")
5 | importFrom("utils", "packageDescription", "package.skeleton")
6 | importFrom("methods", "new")
7 |
8 | export("fastLmPure",
9 | "fastLm",
10 | "RcppArmadillo.package.skeleton",
11 | "armadillo_version",
12 | "armadillo_set_seed",
13 | "armadillo_set_seed_random",
14 |
15 | "armadillo_throttle_cores",
16 | "armadillo_reset_cores",
17 | "armadillo_get_number_of_omp_threads",
18 | "armadillo_set_number_of_omp_threads"
19 | )
20 | S3method("fastLm", "default")
21 | S3method("fastLm", "formula")
22 | S3method("predict", "fastLm")
23 | S3method("print", "fastLm")
24 | S3method("summary", "fastLm")
25 | S3method("print", "summary.fastLm")
26 |
--------------------------------------------------------------------------------
/R/flags.R:
--------------------------------------------------------------------------------
1 | ## Copyright (C) 2010 Dirk Eddelbuettel, Romain Francois and Douglas Bates
2 | ##
3 | ## This file is part of RcppArmadillo.
4 | ##
5 | ## RcppArmadillo is free software: you can redistribute it and/or modify it
6 | ## under the terms of the GNU General Public License as published by
7 | ## the Free Software Foundation, either version 2 of the License, or
8 | ## (at your option) any later version.
9 | ##
10 | ## RcppArmadillo is distributed in the hope that it will be useful, but
11 | ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | ## GNU General Public License for more details.
14 | ##
15 | ## You should have received a copy of the GNU General Public License
16 | ## along with RcppArmadillo. If not, see .
17 |
18 | RcppArmadilloCxxFlags <- function(){
19 | paste( '-I"', system.file( "include", package = "RcppArmadillo" ), '"', sep = "" )
20 | }
21 |
22 | CxxFlags <- function(){
23 | cat( RcppArmadilloCxxFlags() )
24 | }
25 |
--------------------------------------------------------------------------------
/R/init.R:
--------------------------------------------------------------------------------
1 | ## init.R: Startup
2 | ##
3 | ## Copyright (C) 2023 Dirk Eddelbuettel
4 | ##
5 | ## This file is part of RcppArmadillo.
6 | ##
7 | ## RcppArmadillo is free software: you can redistribute it and/or modify it
8 | ## under the terms of the GNU General Public License as published by
9 | ## the Free Software Foundation, either version 2 of the License, or
10 | ## (at your option) any later version.
11 | ##
12 | ## RcppArmadillo is distributed in the hope that it will be useful, but
13 | ## WITHOUT ANY WARRANTY; without even the implied warranty of
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | ## GNU General Public License for more details.
16 | ##
17 | ## You should have received a copy of the GNU General Public License
18 | ## along with RcppArmadillo. If not, see .
19 |
20 | .pkgenv <- new.env(parent=emptyenv())
21 |
22 | .onLoad <- function(libname, pkgname) {
23 | .pkgenv[["omp_threads"]] <- armadillo_get_number_of_omp_threads() # #nocov
24 | }
25 |
26 | ##' Throttle (or Reset) (Rcpp)Armadillo to Two Cores
27 | ##'
28 | ##' Helper functions to throttle use of cores by RcppArmadillo-internal
29 | ##' code on systems with OpenMP. On package load, the initial value is
30 | ##' saved and used to reset the value.
31 | ##' @param n Integer value of desired cores, default is two
32 | armadillo_throttle_cores <- function(n = 2) {
33 | armadillo_set_number_of_omp_threads(n)
34 | }
35 |
36 | ##' @rdname armadillo_throttle_cores
37 | armadillo_reset_cores <- function() {
38 | n <- .pkgenv[["omp_threads"]]
39 | armadillo_set_number_of_omp_threads(n)
40 | }
41 |
--------------------------------------------------------------------------------
/R/inline.R:
--------------------------------------------------------------------------------
1 | ## Copyright (C) 2010 - 2024 Dirk Eddelbuettel, Romain Francois and Douglas Bates
2 | ##
3 | ## This file is part of RcppArmadillo.
4 | ##
5 | ## RcppArmadillo is free software: you can redistribute it and/or modify it
6 | ## under the terms of the GNU General Public License as published by
7 | ## the Free Software Foundation, either version 2 of the License, or
8 | ## (at your option) any later version.
9 | ##
10 | ## RcppArmadillo is distributed in the hope that it will be useful, but
11 | ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | ## GNU General Public License for more details.
14 | ##
15 | ## You should have received a copy of the GNU General Public License
16 | ## along with RcppArmadillo. If not, see .
17 |
18 | inlineCxxPlugin <- function(...) {
19 | ismacos <- Sys.info()[["sysname"]] == "Darwin"
20 | openmpflag <- if (ismacos) "" else "$(SHLIB_OPENMP_CFLAGS)"
21 | plugin <- Rcpp::Rcpp.plugin.maker(include.before = "#include ",
22 | libs = paste(openmpflag, "$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)"),
23 | package = "RcppArmadillo")
24 | settings <- plugin()
25 | settings$env$PKG_CPPFLAGS <- paste("-I../inst/include", openmpflag)
26 | settings
27 | }
28 |
--------------------------------------------------------------------------------
/cleanup:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | rm -f config.log config.status confdefs.h \
4 | src/*.o src/*.so src/symbols.rds \
5 | vignettes/RcppArmadillo-unitTests.out \
6 | vignettes/RcppArmadillo-unitTests.aux \
7 | vignettes/RcppArmadillo-unitTests.log \
8 | vignettes/RcppArmadillo-intro.out \
9 | vignettes/RcppArmadillo*.log \
10 | vignettes/RcppArmadillo*.aux \
11 | vignettes/RcppArmadillo*.out \
12 | vignettes/RcppArmadillo*.tex \
13 | vignettes/RcppArmadillo-*.pdf \
14 | vignettes/*.blg \
15 | vignettes/*.bbl \
16 | vignettes/*.xwm \
17 | vignettes/*~ \
18 | */*~ *~ \
19 | inst/include/RcppArmadilloLapack.h \
20 | inst/include/RcppArmadillo/config/RcppArmadilloConfigGenerated.h \
21 | src/Makevars \
22 | vignettes/jss.bst vignettes/pinp.cls
23 |
24 | rm -rf autom4te.cache/ \
25 | vignettes/auto/
26 |
--------------------------------------------------------------------------------
/inst/AUTHORS:
--------------------------------------------------------------------------------
1 |
2 | Armadillo itself carries the following in file NOTICE.TXT:
3 |
4 | Armadillo C++ Linear Algebra Library
5 | Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
6 | Copyright 2008-2016 National ICT Australia (NICTA)
7 |
8 | This product includes software developed by Conrad Sanderson (http://conradsanderson.id.au)
9 | This product includes software developed at National ICT Australia (NICTA)
10 |
11 |
12 | The RcppArmadillo package integrates Armadillo into R, provides wrappers,
13 | converters, a test framework, examples and more. It was written by Dirk
14 | Eddelbuettel, Romain Francois and Doug Bates with contributions by many
15 | others as detailed in the ChangeLog file.
16 |
--------------------------------------------------------------------------------
/inst/CITATION:
--------------------------------------------------------------------------------
1 | bibentry("Article",
2 | title = "RcppArmadillo: Accelerating R with high-performance C++ linear algebra",
3 | author = c(person("Dirk", "Eddelbuettel",
4 | email = "edd@debian.org",
5 | comment = c(ORCID = "0000-0001-6419-907X")),
6 | person("Conrad", "Sanderson",
7 | comment = c(ORCID = "0000-0002-0049-4501"))),
8 | journal = "Computational Statistics and Data Analysis",
9 | year = "2014",
10 | volume = "71",
11 | month = "March",
12 | pages = "1054--1063",
13 | doi = "10.1016/j.csda.2013.02.005"
14 | )
15 |
16 | bibentry("Manual",
17 | other = unlist(citation(auto = meta), recursive = FALSE))
18 |
--------------------------------------------------------------------------------
/inst/COPYRIGHTS:
--------------------------------------------------------------------------------
1 |
2 | Overall license:
3 | ================
4 |
5 | The (vast) majority of the files in this package are released under the
6 | Apache License, Version 2.0, January 2004 (http://www.apache.org/licenses/)
7 |
8 | The aggregation, integration and packaging work is released under the
9 | GNU GPL (>= 2).
10 |
11 | Details:
12 | ========
13 |
14 | Files: *
15 | Copyright: 2010 - 2017 Dirk Eddelbuettel, Romain Francois and Doug Bates
16 | License: GPL (>= 2)
17 |
18 | Files: inst/include/armadillo:
19 | inst/include/armadillo_bits/*:
20 | Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
21 | Copyright 2008-2016 National ICT Australia (NICTA)
22 | License: Apache-2.0
23 |
--------------------------------------------------------------------------------
/inst/examples/kalman/FirstKalmanR.R:
--------------------------------------------------------------------------------
1 | FirstKalmanR <- function(pos) {
2 |
3 | kalmanfilter <- function(z) {
4 | dt <- 1
5 | A <- matrix(c( 1, 0, dt, 0, 0, 0, 0, 1, 0, dt, 0, 0, # x, y
6 | 0, 0, 1, 0, dt, 0, 0, 0, 0, 1, 0, dt, # Vx, Vy
7 | 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1), # Ax, Ay
8 | 6, 6, byrow=TRUE)
9 | H <- matrix( c(1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0),
10 | 2, 6, byrow=TRUE)
11 | Q <- diag(6)
12 | R <- 1000 * diag(2)
13 |
14 | xprd <- A %*% xest # predicted state and covriance
15 | pprd <- A %*% pest %*% t(A) + Q
16 |
17 | S <- H %*% t(pprd) %*% t(H) + R # estimation
18 | B <- H %*% t(pprd)
19 | kalmangain <- t(solve(S, B))
20 |
21 | ## estimated state and covariance, assign to vars in parent env
22 | xest <<- xprd + kalmangain %*% (z - H %*% xprd)
23 | pest <<- pprd - kalmangain %*% H %*% pprd
24 |
25 | ## compute the estimated measurements
26 | y <- H %*% xest
27 | }
28 | xest <- matrix(0, 6, 1)
29 | pest <- matrix(0, 6, 6)
30 |
31 | N <- nrow(pos)
32 | y <- matrix(NA, N, 2)
33 | for (i in 1:N) {
34 | y[i,] <- kalmanfilter(t(pos[i,,drop=FALSE]))
35 | }
36 | invisible(y)
37 | }
38 |
--------------------------------------------------------------------------------
/inst/examples/kalman/Kalman.cpp:
--------------------------------------------------------------------------------
1 |
2 | // [[Rcpp::depends(RcppArmadillo)]]
3 |
4 | #include
5 |
6 | using namespace arma;
7 |
8 | class Kalman {
9 | private:
10 | mat A, H, Q, R, xest, pest;
11 | double dt;
12 |
13 | public:
14 | // constructor, sets up data structures
15 | Kalman() : dt(1.0) {
16 | A.eye(6,6);
17 | A(0,2) = A(1,3) = A(2,4) = A(3,5) = dt;
18 | H.zeros(2,6);
19 | H(0,0) = H(1,1) = 1.0;
20 | Q.eye(6,6);
21 | R = 1000 * eye(2,2);
22 | xest.zeros(6,1);
23 | pest.zeros(6,6);
24 | }
25 |
26 | // sole member function: estimate model
27 | mat estimate(const mat & Z) {
28 | unsigned int n = Z.n_rows, k = Z.n_cols;
29 | mat Y = zeros(n, k);
30 | mat xprd, pprd, S, B, kalmangain;
31 | colvec z, y;
32 |
33 | for (unsigned int i = 0; i.
20 |
21 | #ifndef RcppArmadillo__RcppArmadillo__h
22 | #define RcppArmadillo__RcppArmadillo__h
23 |
24 | #if defined(Rcpp_hpp) && !defined(COMPILING_RCPPARMADILLO)
25 | #error "The file 'Rcpp.h' should not be included. Please correct to include only 'RcppArmadillo.h'."
26 | #endif
27 |
28 | // Set up actual #include after first #include and more config
29 | #include
30 |
31 | // Now automatically include Rcpp as well
32 | #include
33 |
34 | // Remaining RcppArmadillo code
35 | #include
36 | #include
37 | #include
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/inst/include/RcppArmadillo/Alt_R_RNG.h:
--------------------------------------------------------------------------------
1 |
2 | // This file support the legacy location and includes from the new location
3 |
4 | #include "RcppArmadillo/rng/Alt_R_RNG.h"
5 |
--------------------------------------------------------------------------------
/inst/include/RcppArmadillo/config/RcppArmadilloConfigGenerated.h.in:
--------------------------------------------------------------------------------
1 |
2 | // RcppArmadilloGenerated.h: Autoconf-updated file for LAPACK and OpenMP choices
3 | //
4 | // Copyright (C) 2013 - 2021 Dirk Eddelbuettel
5 | //
6 | // This file is part of RcppArmadillo.
7 | //
8 | // RcppArmadillo is free software: you can redistribute it and/or modify it
9 | // under the terms of the GNU General Public License as published by
10 | // the Free Software Foundation, either version 2 of the License, or
11 | // (at your option) any later version.
12 | //
13 | // RcppArmadillo is distributed in the hope that it will be useful, but
14 | // WITHOUT ANY WARRANTY; without even the implied warranty of
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | // GNU General Public License for more details.
17 | //
18 | // You should have received a copy of the GNU General Public License
19 | // along with RcppArmadillo. If not, see .
20 |
21 | #ifndef RcppArmadillo__RcppArmadilloConfigGenerated__h
22 | #define RcppArmadillo__RcppArmadilloConfigGenerated__h
23 |
24 | #ifndef ARMA_CRIPPLED_LAPACK
25 | // value on next line may be changed between #undef and #define by the configure script
26 | @ARMA_LAPACK@
27 | #endif
28 |
29 | #ifndef ARMA_USE_OPENMP
30 | // from configure test for OpenMP based on how R is configured, and whether g++ new enough
31 | @ARMA_HAVE_OPENMP@
32 | #endif
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/inst/include/RcppArmadillo/internal/Col_meat.h:
--------------------------------------------------------------------------------
1 | // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 | /* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
3 | //
4 | // Col_meat.h: Rcpp/Armadillo glue
5 | //
6 | // Copyright (C) 2011 - 2013 Dirk Eddelbuettel, Romain Francois and Douglas Bates
7 | //
8 | // This file is part of RcppArmadillo.
9 | //
10 | // RcppArmadillo is free software: you can redistribute it and/or modify it
11 | // under the terms of the GNU General Public License as published by
12 | // the Free Software Foundation, either version 2 of the License, or
13 | // (at your option) any later version.
14 | //
15 | // RcppArmadillo is distributed in the hope that it will be useful, but
16 | // WITHOUT ANY WARRANTY; without even the implied warranty of
17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | // GNU General Public License for more details.
19 | //
20 | // You should have received a copy of the GNU General Public License
21 | // along with RcppArmadillo. If not, see .
22 |
23 | #ifndef RCPPARMADILLO_COL_MEAT_H
24 | #define RCPPARMADILLO_COL_MEAT_H
25 |
26 | template
27 | template
28 | inline Col::Col( const Rcpp::VectorBase& X )
29 | : Mat( X )
30 | {
31 | arma_extra_debug_sigprint(this);
32 | access::rw(Mat::vec_state) = 1;
33 | }
34 |
35 | template
36 | template
37 | inline Col::Col( const Rcpp::MatrixBase& X )
38 | : Mat( X )
39 | {
40 | arma_extra_debug_sigprint(this);
41 |
42 | arma_debug_check( (Mat::n_cols > 1), "Col(): incompatible dimensions" );
43 |
44 | access::rw(Mat::vec_state) = 1;
45 | }
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/inst/include/RcppArmadillo/internal/Col_proto.h:
--------------------------------------------------------------------------------
1 | // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 | /* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
3 | //
4 | // Col_proto.h: Rcpp/Armadillo glue
5 | //
6 | // Copyright (C) 2010 - 2013 Dirk Eddelbuettel, Romain Francois and Douglas Bates
7 | //
8 | // This file is part of RcppArmadillo.
9 | //
10 | // RcppArmadillo is free software: you can redistribute it and/or modify it
11 | // under the terms of the GNU General Public License as published by
12 | // the Free Software Foundation, either version 2 of the License, or
13 | // (at your option) any later version.
14 | //
15 | // RcppArmadillo is distributed in the hope that it will be useful, but
16 | // WITHOUT ANY WARRANTY; without even the implied warranty of
17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | // GNU General Public License for more details.
19 | //
20 | // You should have received a copy of the GNU General Public License
21 | // along with RcppArmadillo. If not, see .
22 |
23 |
24 | #ifndef RCPPARMADILLO_COL_PROTO_H
25 | #define RCPPARMADILLO_COL_PROTO_H
26 |
27 | template
28 | inline Col( const Rcpp::VectorBase& X ) ;
29 |
30 | template
31 | inline Col( const Rcpp::MatrixBase& X ) ;
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/inst/include/RcppArmadillo/internal/Mat_proto.h:
--------------------------------------------------------------------------------
1 | // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 | /* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
3 | //
4 | // Mat_proto.h: Rcpp/Armadillo glue
5 | //
6 | // Copyright (C) 2010 - 2013 Dirk Eddelbuettel, Romain Francois and Douglas Bates
7 | //
8 | // This file is part of RcppArmadillo.
9 | //
10 | // RcppArmadillo is free software: you can redistribute it and/or modify it
11 | // under the terms of the GNU General Public License as published by
12 | // the Free Software Foundation, either version 2 of the License, or
13 | // (at your option) any later version.
14 | //
15 | // RcppArmadillo is distributed in the hope that it will be useful, but
16 | // WITHOUT ANY WARRANTY; without even the implied warranty of
17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | // GNU General Public License for more details.
19 | //
20 | // You should have received a copy of the GNU General Public License
21 | // along with RcppArmadillo. If not, see .
22 |
23 |
24 | #ifndef RCPPARMADILLO_MAT_PROTO_H
25 | #define RCPPARMADILLO_MAT_PROTO_H
26 |
27 | template
28 | inline Mat( const Rcpp::VectorBase& X ) ;
29 |
30 | template
31 | inline Mat( const Rcpp::MatrixBase& X ) ;
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/inst/include/RcppArmadillo/internal/Row_meat.h:
--------------------------------------------------------------------------------
1 | // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 | /* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
3 | //
4 | // Row_meat.h: Rcpp/Armadillo glue
5 | //
6 | // Copyright (C) 2011 - 2013 Dirk Eddelbuettel, Romain Francois and Douglas Bates
7 | //
8 | // This file is part of RcppArmadillo.
9 | //
10 | // RcppArmadillo is free software: you can redistribute it and/or modify it
11 | // under the terms of the GNU General Public License as published by
12 | // the Free Software Foundation, either version 2 of the License, or
13 | // (at your option) any later version.
14 | //
15 | // RcppArmadillo is distributed in the hope that it will be useful, but
16 | // WITHOUT ANY WARRANTY; without even the implied warranty of
17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | // GNU General Public License for more details.
19 | //
20 | // You should have received a copy of the GNU General Public License
21 | // along with RcppArmadillo. If not, see .
22 |
23 | #ifndef RCPPARMADILLO_ROW_MEAT_H
24 | #define RCPPARMADILLO_ROW_MEAT_H
25 |
26 | template
27 | template
28 | inline Row::Row( const Rcpp::VectorBase& X )
29 | : Mat( X ) {
30 | arma_extra_debug_sigprint(this);
31 | std::swap( access::rw(Mat::n_rows), access::rw(Mat::n_cols) );
32 | access::rw(Mat::vec_state) = 2;
33 | }
34 |
35 | template
36 | template
37 | inline Row::Row( const Rcpp::MatrixBase& X )
38 | : Mat( X ) {
39 |
40 | arma_extra_debug_sigprint(this);
41 |
42 | arma_debug_check( (Mat::n_rows > 1), "Row(): incompatible dimensions" );
43 |
44 | access::rw(Mat::vec_state) = 2;
45 | }
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/inst/include/RcppArmadillo/internal/Row_proto.h:
--------------------------------------------------------------------------------
1 | // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 | /* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
3 | //
4 | // Row_proto.h: Rcpp/Armadillo glue
5 | //
6 | // Copyright (C) 2010 - 2013 Dirk Eddelbuettel, Romain Francois and Douglas Bates
7 | //
8 | // This file is part of RcppArmadillo.
9 | //
10 | // RcppArmadillo is free software: you can redistribute it and/or modify it
11 | // under the terms of the GNU General Public License as published by
12 | // the Free Software Foundation, either version 2 of the License, or
13 | // (at your option) any later version.
14 | //
15 | // RcppArmadillo is distributed in the hope that it will be useful, but
16 | // WITHOUT ANY WARRANTY; without even the implied warranty of
17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | // GNU General Public License for more details.
19 | //
20 | // You should have received a copy of the GNU General Public License
21 | // along with RcppArmadillo. If not, see .
22 |
23 |
24 | #ifndef RCPPARMADILLO_ROW_PROTO_H
25 | #define RCPPARMADILLO_ROW_PROTO_H
26 |
27 | template
28 | inline Row( const Rcpp::VectorBase& X ) ;
29 |
30 | template
31 | inline Row( const Rcpp::MatrixBase& X ) ;
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/CubeToMatOp_meat.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup CubeToMatOp
20 | //! @{
21 |
22 |
23 |
24 | template
25 | inline
26 | CubeToMatOp::CubeToMatOp(const T1& in_m)
27 | : m(in_m)
28 | {
29 | arma_debug_sigprint();
30 | }
31 |
32 |
33 |
34 | template
35 | inline
36 | CubeToMatOp::CubeToMatOp(const T1& in_m, const uword in_aux_uword)
37 | : m(in_m)
38 | , aux_uword(in_aux_uword)
39 | {
40 | arma_debug_sigprint();
41 | }
42 |
43 |
44 |
45 | template
46 | inline
47 | CubeToMatOp::~CubeToMatOp()
48 | {
49 | arma_debug_sigprint();
50 | }
51 |
52 |
53 |
54 | //! @}
55 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/GlueCube_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup GlueCube
20 | //! @{
21 |
22 |
23 |
24 | //! analog of the Glue class, intended for Cube objects
25 | template
26 | class GlueCube : public BaseCube< typename T1::elem_type, GlueCube >
27 | {
28 | public:
29 |
30 | typedef typename T1::elem_type elem_type;
31 | typedef typename get_pod_type::result pod_type;
32 |
33 | inline GlueCube(const BaseCube& in_A, const BaseCube& in_B);
34 | inline ~GlueCube();
35 |
36 | const T1& A; //!< first operand; must be derived from BaseCube
37 | const T2& B; //!< second operand; must be derived from BaseCube
38 | };
39 |
40 |
41 |
42 | //! @}
43 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/GlueCube_meat.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup GlueCube
20 | //! @{
21 |
22 |
23 |
24 | template
25 | inline
26 | GlueCube::GlueCube(const BaseCube& in_A, const BaseCube& in_B)
27 | : A(in_A.get_ref())
28 | , B(in_B.get_ref())
29 | {
30 | arma_debug_sigprint();
31 | }
32 |
33 |
34 |
35 | template
36 | inline
37 | GlueCube::~GlueCube()
38 | {
39 | arma_debug_sigprint();
40 | }
41 |
42 |
43 |
44 | //! @}
45 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/SizeCube_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup SizeCube
20 | //! @{
21 |
22 |
23 |
24 | class SizeCube
25 | {
26 | public:
27 |
28 | const uword n_rows;
29 | const uword n_cols;
30 | const uword n_slices;
31 |
32 | inline explicit SizeCube(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices);
33 |
34 | inline uword operator[](const uword dim) const;
35 | inline uword operator()(const uword dim) const;
36 |
37 | inline bool operator==(const SizeCube& s) const;
38 | inline bool operator!=(const SizeCube& s) const;
39 |
40 | inline SizeCube operator+(const SizeCube& s) const;
41 | inline SizeCube operator-(const SizeCube& s) const;
42 |
43 | inline SizeCube operator+(const uword val) const;
44 | inline SizeCube operator-(const uword val) const;
45 |
46 | inline SizeCube operator*(const uword val) const;
47 | inline SizeCube operator/(const uword val) const;
48 | };
49 |
50 |
51 |
52 | //! @}
53 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/SizeMat_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup SizeMat
20 | //! @{
21 |
22 |
23 |
24 | class SizeMat
25 | {
26 | public:
27 |
28 | const uword n_rows;
29 | const uword n_cols;
30 |
31 | inline explicit SizeMat(const uword in_n_rows, const uword in_n_cols);
32 |
33 | inline uword operator[](const uword dim) const;
34 | inline uword operator()(const uword dim) const;
35 |
36 | inline bool operator==(const SizeMat& s) const;
37 | inline bool operator!=(const SizeMat& s) const;
38 |
39 | inline SizeMat operator+(const SizeMat& s) const;
40 | inline SizeMat operator-(const SizeMat& s) const;
41 |
42 | inline SizeMat operator+(const uword val) const;
43 | inline SizeMat operator-(const uword val) const;
44 |
45 | inline SizeMat operator*(const uword val) const;
46 | inline SizeMat operator/(const uword val) const;
47 | };
48 |
49 |
50 |
51 | //! @}
52 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/SpToDGlue_meat.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup SpToDGlue
20 | //! @{
21 |
22 |
23 |
24 | template
25 | inline
26 | SpToDGlue::SpToDGlue(const T1& in_A, const T2& in_B)
27 | : A(in_A)
28 | , B(in_B)
29 | {
30 | arma_debug_sigprint();
31 | }
32 |
33 |
34 |
35 | template
36 | inline
37 | SpToDGlue::~SpToDGlue()
38 | {
39 | arma_debug_sigprint();
40 | }
41 |
42 |
43 |
44 | //! @}
45 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/SpToDOp_meat.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup SpToDOp
20 | //! @{
21 |
22 |
23 |
24 | template
25 | inline
26 | SpToDOp::SpToDOp(const T1& in_m)
27 | : m(in_m)
28 | {
29 | arma_debug_sigprint();
30 | }
31 |
32 |
33 |
34 | template
35 | inline
36 | SpToDOp::SpToDOp(const T1& in_m, const typename T1::elem_type in_aux)
37 | : m(in_m)
38 | , aux(in_aux)
39 | {
40 | arma_debug_sigprint();
41 | }
42 |
43 |
44 |
45 | template
46 | inline
47 | SpToDOp::SpToDOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b)
48 | : m(in_m)
49 | , aux_uword_a(in_aux_uword_a)
50 | , aux_uword_b(in_aux_uword_b)
51 | {
52 | arma_debug_sigprint();
53 | }
54 |
55 |
56 |
57 | template
58 | inline
59 | SpToDOp::~SpToDOp()
60 | {
61 | arma_debug_sigprint();
62 | }
63 |
64 |
65 |
66 | //! @}
67 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/arma_static_check.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup arma_static_check
20 | //! @{
21 |
22 |
23 | #undef arma_static_check
24 | #define arma_static_check(condition, message) static_assert( !(condition), message )
25 |
26 | #undef arma_type_check
27 | #define arma_type_check(condition) static_assert( !(condition), "error: type mismatch or unsupported type" )
28 |
29 |
30 | //! @}
31 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/arma_version.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup arma_version
20 | //! @{
21 |
22 |
23 |
24 | #define ARMA_VERSION_MAJOR 14
25 | #define ARMA_VERSION_MINOR 4
26 | #define ARMA_VERSION_PATCH 3
27 | #define ARMA_VERSION_NAME "Filtered Espresso"
28 |
29 |
30 |
31 | struct arma_version
32 | {
33 | static constexpr unsigned int major = ARMA_VERSION_MAJOR;
34 | static constexpr unsigned int minor = ARMA_VERSION_MINOR;
35 | static constexpr unsigned int patch = ARMA_VERSION_PATCH;
36 |
37 | static
38 | inline
39 | std::string
40 | as_string()
41 | {
42 | const char* nickname = ARMA_VERSION_NAME;
43 |
44 | std::ostringstream ss;
45 |
46 | ss << arma_version::major
47 | << '.'
48 | << arma_version::minor
49 | << '.'
50 | << arma_version::patch
51 | << " ("
52 | << nickname
53 | << ')';
54 |
55 | return ss.str();
56 | }
57 | };
58 |
59 |
60 |
61 | //! @}
62 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/compiler_setup_post.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 |
20 | #if defined(_MSC_VER)
21 |
22 | #pragma warning(pop)
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/cond_rel_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup cond_rel
20 | //! @{
21 |
22 |
23 | //
24 | // for preventing pedantic compiler warnings
25 |
26 | template
27 | class cond_rel
28 | {
29 | public:
30 |
31 | template arma_inline static bool lt(const eT A, const eT B);
32 | template arma_inline static bool gt(const eT A, const eT B);
33 |
34 | template arma_inline static bool leq(const eT A, const eT B);
35 | template arma_inline static bool geq(const eT A, const eT B);
36 |
37 | template arma_inline static eT make_neg(const eT val);
38 | };
39 |
40 |
41 |
42 | //! @}
43 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/def_fftw3.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | #if defined(ARMA_USE_FFTW3) && !defined(FFTW3_H)
20 |
21 |
22 | // prefix for single precision: fftwf_
23 | // prefix for double precision: fftw_
24 |
25 |
26 | typedef void fftwf_complex;
27 | typedef void fftw_complex;
28 |
29 | typedef void_ptr fftwf_plan;
30 | typedef void_ptr fftw_plan;
31 |
32 |
33 | extern "C"
34 | {
35 | // single precision (float)
36 |
37 | fftwf_plan fftwf_plan_dft_1d(int N, fftwf_complex* input, fftwf_complex* output, int fftw3_sign, unsigned int fftw3_flags);
38 |
39 | void fftwf_execute(fftwf_plan plan);
40 | void fftwf_destroy_plan(fftwf_plan plan);
41 |
42 | void fftwf_cleanup();
43 |
44 |
45 | // double precision (double)
46 |
47 | fftw_plan fftw_plan_dft_1d(int N, fftw_complex* input, fftw_complex* output, int fftw3_sign, unsigned int fftw3_flags);
48 |
49 | void fftw_execute(fftw_plan plan);
50 | void fftw_destroy_plan(fftw_plan plan);
51 |
52 | void fftw_cleanup();
53 | }
54 |
55 |
56 | #endif
57 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_cor.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_cor
20 | //! @{
21 |
22 |
23 |
24 | template
25 | arma_warn_unused
26 | inline
27 | const Op
28 | cor(const Base& X, const uword norm_type = 0)
29 | {
30 | arma_debug_sigprint();
31 |
32 | arma_conform_check( (norm_type > 1), "cor(): parameter 'norm_type' must be 0 or 1" );
33 |
34 | return Op(X.get_ref(), norm_type, 0);
35 | }
36 |
37 |
38 |
39 | template
40 | arma_warn_unused
41 | inline
42 | const Glue
43 | cor(const Base& A, const Base& B, const uword norm_type = 0)
44 | {
45 | arma_debug_sigprint();
46 |
47 | arma_conform_check( (norm_type > 1), "cor(): parameter 'norm_type' must be 0 or 1" );
48 |
49 | return Glue(A.get_ref(), B.get_ref(), norm_type);
50 | }
51 |
52 |
53 |
54 | //! @}
55 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_cov.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_cov
20 | //! @{
21 |
22 |
23 |
24 | template
25 | arma_warn_unused
26 | inline
27 | const Op
28 | cov(const Base& X, const uword norm_type = 0)
29 | {
30 | arma_debug_sigprint();
31 |
32 | arma_conform_check( (norm_type > 1), "cov(): parameter 'norm_type' must be 0 or 1" );
33 |
34 | return Op(X.get_ref(), norm_type, 0);
35 | }
36 |
37 |
38 |
39 | template
40 | arma_warn_unused
41 | inline
42 | const Glue
43 | cov(const Base& A, const Base& B, const uword norm_type = 0)
44 | {
45 | arma_debug_sigprint();
46 |
47 | arma_conform_check( (norm_type > 1), "cov(): parameter 'norm_type' must be 0 or 1" );
48 |
49 | return Glue(A.get_ref(), B.get_ref(), norm_type);
50 | }
51 |
52 |
53 |
54 | //! @}
55 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_cross.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_cross
20 | //! @{
21 |
22 |
23 |
24 | //! cross product (only valid for 3 dimensional vectors)
25 | template
26 | arma_warn_unused
27 | inline
28 | typename
29 | enable_if2
30 | <
31 | is_arma_type::value && is_arma_type::value && is_same_type::value,
32 | const Glue
33 | >::result
34 | cross(const T1& X, const T2& Y)
35 | {
36 | arma_debug_sigprint();
37 |
38 | return Glue(X, Y);
39 | }
40 |
41 |
42 |
43 | //! @}
44 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_kmeans.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_kmeans
20 | //! @{
21 |
22 |
23 |
24 | template
25 | inline
26 | typename enable_if2::value, bool>::result
27 | kmeans
28 | (
29 | Mat& means,
30 | const Base& data,
31 | const uword k,
32 | const gmm_seed_mode& seed_mode,
33 | const uword n_iter,
34 | const bool print_mode
35 | )
36 | {
37 | arma_debug_sigprint();
38 |
39 | typedef typename T1::elem_type eT;
40 |
41 | gmm_priv::gmm_diag model;
42 |
43 | const bool status = model.kmeans_wrapper(means, data.get_ref(), k, seed_mode, n_iter, print_mode);
44 |
45 | if(status)
46 | {
47 | means = model.means;
48 | }
49 | else
50 | {
51 | means.soft_reset();
52 | }
53 |
54 | return status;
55 | }
56 |
57 |
58 |
59 | //! @}
60 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_nonzeros.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_nonzeros
20 | //! @{
21 |
22 |
23 | template
24 | arma_warn_unused
25 | inline
26 | const Op
27 | nonzeros(const Base& X)
28 | {
29 | arma_debug_sigprint();
30 |
31 | return Op(X.get_ref());
32 | }
33 |
34 |
35 |
36 | template
37 | arma_warn_unused
38 | inline
39 | const SpToDOp
40 | nonzeros(const SpBase& X)
41 | {
42 | arma_debug_sigprint();
43 |
44 | return SpToDOp(X.get_ref());
45 | }
46 |
47 |
48 |
49 | //! @}
50 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_polyval.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_polyval
20 | //! @{
21 |
22 |
23 |
24 | template
25 | arma_warn_unused
26 | inline
27 | typename
28 | enable_if2
29 | <
30 | (is_supported_blas_type::value && is_arma_type::value && is_same_type::value),
31 | const Glue
32 | >::result
33 | polyval(const Base& P, const T2& X)
34 | {
35 | arma_debug_sigprint();
36 |
37 | return Glue(P.get_ref(), X);
38 | }
39 |
40 |
41 |
42 | //! @}
43 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_range.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_range
20 | //! @{
21 |
22 |
23 | template
24 | arma_warn_unused
25 | inline
26 | typename enable_if2< is_arma_type::value && resolves_to_vector::yes, typename T1::elem_type >::result
27 | range(const T1& X)
28 | {
29 | arma_debug_sigprint();
30 |
31 | return op_range::vector_range(X);
32 | }
33 |
34 |
35 |
36 | template
37 | arma_warn_unused
38 | arma_inline
39 | typename enable_if2< is_arma_type::value && resolves_to_vector::no, const Op >::result
40 | range(const T1& X)
41 | {
42 | arma_debug_sigprint();
43 |
44 | return Op(X, 0, 0);
45 | }
46 |
47 |
48 |
49 | template
50 | arma_warn_unused
51 | arma_inline
52 | typename enable_if2< is_arma_type::value, const Op >::result
53 | range(const T1& X, const uword dim)
54 | {
55 | arma_debug_sigprint();
56 |
57 | return Op(X, dim, 0);
58 | }
59 |
60 |
61 |
62 | //! @}
63 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_repelem.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 |
20 | //! \addtogroup fn_repelem
21 | //! @{
22 |
23 |
24 | template
25 | arma_warn_unused
26 | arma_inline
27 | typename
28 | enable_if2
29 | <
30 | is_arma_type::value,
31 | const Op
32 | >::result
33 | repelem(const T1& A, const uword r, const uword c)
34 | {
35 | arma_debug_sigprint();
36 |
37 | return Op(A, r, c);
38 | }
39 |
40 |
41 |
42 | template
43 | arma_warn_unused
44 | arma_inline
45 | const SpOp
46 | repelem(const SpBase& A, const uword r, const uword c)
47 | {
48 | arma_debug_sigprint();
49 |
50 | return SpOp(A.get_ref(), r, c);
51 | }
52 |
53 |
54 |
55 | //! @}
56 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_repmat.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 |
20 | //! \addtogroup fn_repmat
21 | //! @{
22 |
23 |
24 | template
25 | arma_warn_unused
26 | arma_inline
27 | typename
28 | enable_if2
29 | <
30 | is_arma_type::value,
31 | const Op
32 | >::result
33 | repmat(const T1& A, const uword r, const uword c)
34 | {
35 | arma_debug_sigprint();
36 |
37 | return Op(A, r, c);
38 | }
39 |
40 |
41 |
42 | template
43 | arma_warn_unused
44 | arma_inline
45 | const SpOp
46 | repmat(const SpBase& A, const uword r, const uword c)
47 | {
48 | arma_debug_sigprint();
49 |
50 | return SpOp(A.get_ref(), r, c);
51 | }
52 |
53 |
54 |
55 | //! @}
56 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_spones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_spones
20 | //! @{
21 |
22 |
23 |
24 | //! Generate a sparse matrix with the non-zero values in the same locations as in the given sparse matrix X,
25 | //! with the non-zero values set to one
26 | template
27 | arma_warn_unused
28 | inline
29 | SpMat
30 | spones(const SpBase& X)
31 | {
32 | arma_debug_sigprint();
33 |
34 | typedef typename T1::elem_type eT;
35 |
36 | const unwrap_spmat U(X.get_ref());
37 |
38 | SpMat out(arma_layout_indicator(), U.M);
39 |
40 | arrayops::inplace_set( access::rwp(out.values), eT(1), out.n_nonzero );
41 |
42 | return out;
43 | }
44 |
45 |
46 |
47 | //! @}
48 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_toeplitz.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_toeplitz
20 | //! @{
21 |
22 |
23 |
24 | template
25 | arma_warn_unused
26 | inline
27 | const Op
28 | toeplitz(const Base& X)
29 | {
30 | arma_debug_sigprint();
31 |
32 | return Op( X.get_ref() );
33 | }
34 |
35 |
36 |
37 | template
38 | arma_warn_unused
39 | inline
40 | const Op
41 | circ_toeplitz(const Base& X)
42 | {
43 | arma_debug_sigprint();
44 |
45 | return Op( X.get_ref() );
46 | }
47 |
48 |
49 |
50 | template
51 | arma_warn_unused
52 | inline
53 | const Glue
54 | toeplitz(const Base& X, const Base& Y)
55 | {
56 | arma_debug_sigprint();
57 |
58 | return Glue( X.get_ref(), Y.get_ref() );
59 | }
60 |
61 |
62 |
63 | //! @}
64 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_trapz.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_trapz
20 | //! @{
21 |
22 |
23 |
24 | template
25 | arma_warn_unused
26 | inline
27 | const Glue
28 | trapz
29 | (
30 | const Base& X,
31 | const Base& Y,
32 | const uword dim = 0
33 | )
34 | {
35 | arma_debug_sigprint();
36 |
37 | return Glue(X.get_ref(), Y.get_ref(), dim);
38 | }
39 |
40 |
41 |
42 | template
43 | arma_warn_unused
44 | inline
45 | const Op
46 | trapz
47 | (
48 | const Base& Y,
49 | const uword dim = 0
50 | )
51 | {
52 | arma_debug_sigprint();
53 |
54 | return Op(Y.get_ref(), dim, uword(0));
55 | }
56 |
57 |
58 |
59 | //! @}
60 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/fn_unique.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup fn_unique
20 | //! @{
21 |
22 |
23 | template
24 | arma_warn_unused
25 | inline
26 | typename
27 | enable_if2
28 | <
29 | is_arma_type::value && resolves_to_vector::yes,
30 | const Op
31 | >::result
32 | unique(const T1& A)
33 | {
34 | arma_debug_sigprint();
35 |
36 | return Op(A);
37 | }
38 |
39 |
40 | template
41 | arma_warn_unused
42 | inline
43 | typename
44 | enable_if2
45 | <
46 | is_arma_type::value && resolves_to_vector::no,
47 | const Op
48 | >::result
49 | unique(const T1& A)
50 | {
51 | arma_debug_sigprint();
52 |
53 | return Op(A);
54 | }
55 |
56 |
57 | //! @}
58 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/glue_atan2_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 |
20 | //! \addtogroup glue_atan2
21 | //! @{
22 |
23 |
24 |
25 | class glue_atan2
26 | : public traits_glue_or
27 | {
28 | public:
29 |
30 |
31 | // matrices
32 |
33 | template inline static void apply(Mat& out, const Glue& expr);
34 |
35 | template inline static void apply_noalias(Mat& out, const Proxy& P1, const Proxy& P2);
36 |
37 |
38 | // cubes
39 |
40 | template inline static void apply(Cube& out, const GlueCube& expr);
41 |
42 | template inline static void apply_noalias(Cube& out, const ProxyCube& P1, const ProxyCube& P2);
43 | };
44 |
45 |
46 |
47 | //! @}
48 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/glue_cor_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 |
20 | //! \addtogroup glue_cor
21 | //! @{
22 |
23 |
24 |
25 | class glue_cor
26 | {
27 | public:
28 |
29 | template
30 | struct traits
31 | {
32 | static constexpr bool is_row = false; // T1::is_col; // TODO: check
33 | static constexpr bool is_col = false; // T2::is_col; // TODO: check
34 | static constexpr bool is_xvec = false;
35 | };
36 |
37 | template inline static void apply(Mat& out, const Glue& X);
38 | };
39 |
40 |
41 |
42 | //! @}
43 |
44 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/glue_cov_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 |
20 | //! \addtogroup glue_cov
21 | //! @{
22 |
23 |
24 |
25 | class glue_cov
26 | {
27 | public:
28 |
29 | template
30 | struct traits
31 | {
32 | static constexpr bool is_row = false; // T1::is_col; // TODO: check
33 | static constexpr bool is_col = false; // T2::is_col; // TODO: check
34 | static constexpr bool is_xvec = false;
35 | };
36 |
37 | template inline static void apply(Mat& out, const Glue& X);
38 | };
39 |
40 |
41 |
42 | //! @}
43 |
44 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/glue_cross_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 |
20 | //! \addtogroup glue_cross
21 | //! @{
22 |
23 |
24 |
25 | class glue_cross
26 | {
27 | public:
28 |
29 | template
30 | struct traits
31 | {
32 | static constexpr bool is_row = T1::is_row;
33 | static constexpr bool is_col = T1::is_col;
34 | static constexpr bool is_xvec = true;
35 | };
36 |
37 | template inline static void apply(Mat& out, const Glue& X);
38 | };
39 |
40 |
41 |
42 | //! @}
43 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/glue_hist_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup glue_hist
20 | //! @{
21 |
22 |
23 | class glue_hist
24 | : public traits_glue_default
25 | {
26 | public:
27 |
28 | template
29 | inline static void apply_noalias(Mat& out, const Mat& X, const Mat& C, const uword dim);
30 |
31 | template
32 | inline static void apply(Mat& out, const mtGlue& expr);
33 | };
34 |
35 |
36 |
37 | class glue_hist_default
38 | {
39 | public:
40 |
41 | template
42 | struct traits
43 | {
44 | static constexpr bool is_row = T1::is_row;
45 | static constexpr bool is_col = T1::is_col;
46 | static constexpr bool is_xvec = T1::is_xvec;
47 | };
48 |
49 | template
50 | inline static void apply(Mat& out, const mtGlue& expr);
51 | };
52 |
53 |
54 | //! @}
55 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/glue_histc_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 | //! \addtogroup glue_histc
20 | //! @{
21 |
22 |
23 | class glue_histc
24 | : public traits_glue_default
25 | {
26 | public:
27 |
28 | template
29 | inline static void apply_noalias(Mat& C, const Mat& A, const Mat& B, const uword dim);
30 |
31 | template
32 | inline static void apply(Mat& C, const mtGlue& expr);
33 | };
34 |
35 |
36 |
37 | class glue_histc_default
38 | {
39 | public:
40 |
41 | template
42 | struct traits
43 | {
44 | static constexpr bool is_row = T1::is_row;
45 | static constexpr bool is_col = T1::is_col;
46 | static constexpr bool is_xvec = T1::is_xvec;
47 | };
48 |
49 | template
50 | inline static void apply(Mat& C, const mtGlue& expr);
51 | };
52 |
53 |
54 | //! @}
55 |
--------------------------------------------------------------------------------
/inst/include/armadillo_bits/glue_hypot_bones.hpp:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: Apache-2.0
2 | //
3 | // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 | // Copyright 2008-2016 National ICT Australia (NICTA)
5 | //
6 | // Licensed under the Apache License, Version 2.0 (the "License");
7 | // you may not use this file except in compliance with the License.
8 | // You may obtain a copy of the License at
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | // ------------------------------------------------------------------------
17 |
18 |
19 |
20 | //! \addtogroup glue_hypot
21 | //! @{
22 |
23 |
24 |
25 | class glue_hypot
26 | : public traits_glue_or
27 | {
28 | public:
29 |
30 |
31 | // matrices
32 |
33 | template inline static void apply(Mat& out, const Glue& expr);
34 |
35 | template inline static void apply_noalias(Mat& out, const Proxy& P1, const Proxy& P2);
36 |
37 |
38 | // cubes
39 |
40 | template inline static void apply(Cube& out, const GlueCube& expr);
41 |
42 | template inline static void apply_noalias(Cube& out, const ProxyCube& P1, const ProxyCube