20#ifndef LIBENA_BIND_CXXWRAP_HPP
21#define LIBENA_BIND_CXXWRAP_HPP
23#include <libqe/bind/cxxwrap.hpp>
24#include <jlcxx/stl.hpp>
25#include <jlcxx/tuple.hpp>
40inline std::vector<double>
pack(
const arma::vec& v) {
41 return std::vector<double>(v.memptr(), v.memptr() + v.n_elem);
47 std::vector<double>, int32_t, int32_t,
48 std::vector<double>, int32_t, int32_t,
49 std::vector<double>, int32_t, int32_t,
50 std::vector<double>, int32_t, int32_t>;
53 auto n = [](
const arma::mat& m) {
return static_cast<int32_t
>(m.n_rows); };
54 auto c = [](
const arma::mat& m) {
return static_cast<int32_t
>(m.n_cols); };
63 std::vector<double>, int32_t, int32_t,
64 std::vector<double>, int32_t, int32_t>;
67 auto n = [](
const arma::mat& m) {
return static_cast<int32_t
>(m.n_rows); };
68 auto c = [](
const arma::mat& m) {
return static_cast<int32_t
>(m.n_cols); };
75 std::vector<double>, int32_t, int32_t,
77 std::vector<std::string>>;
81 static_cast<int32_t
>(r.
rotation.n_rows),
82 static_cast<int32_t
>(r.
rotation.n_cols),
91 std::vector<double>, std::vector<double>, std::vector<double>,
92 std::vector<double>, std::vector<double>>;
Cross-Covariance Decay (CCD) window-size estimation.
NodePositionsTuple to_tuple(const qe::NodePositions &r)
Definition cxxwrap.hpp:52
std::tuple< int32_t, int32_t, std::vector< double >, std::vector< double >, std::vector< double >, std::vector< double >, std::vector< double > > CCDTuple
Definition cxxwrap.hpp:92
std::tuple< std::vector< double >, int32_t, int32_t, std::vector< double >, int32_t, int32_t, std::vector< double >, int32_t, int32_t, std::vector< double >, int32_t, int32_t > NodePositionsTuple
Definition cxxwrap.hpp:50
std::tuple< std::vector< double >, int32_t, int32_t, std::vector< double >, std::vector< std::string > > RotationTuple
(rotation, rows, cols, eigenvalues, column_names)
Definition cxxwrap.hpp:77
std::tuple< std::vector< double >, int32_t, int32_t, std::vector< double >, int32_t, int32_t > MovedNodesTuple
(nodes, rows, cols, centroids, rows, cols)
Definition cxxwrap.hpp:64
std::vector< double > pack(const arma::vec &v)
Definition cxxwrap.hpp:40
Definition cxxwrap.hpp:36
ENA node-position solvers for undirected and directed networks, the points-to-centroids correlation (...
Rotation routines for Epistemic Network Analysis (ENA): SVD, deflation, orthogonal-SVD,...
Result of a CCD window-size estimation.
Definition ccd.hpp:32
arma::vec frob_unbiased_signed
sign * sqrt(|corrected sq|) per lag.
Definition ccd.hpp:38
arma::vec total_weight
Pooled overlap weight per lag.
Definition ccd.hpp:39
int window_size
Estimated half-life lag window size (>= 1).
Definition ccd.hpp:33
arma::vec frob_sq_unbiased
Noise-corrected squared Frobenius norm per lag.
Definition ccd.hpp:37
arma::vec lag
Evaluated lags, 0..max_window.
Definition ccd.hpp:35
arma::vec frob
Uncorrected pooled Frobenius norm per lag.
Definition ccd.hpp:36
int peak_lag
Lag of the peak corrected cross-covariance norm.
Definition ccd.hpp:34
Result of move_nodes_to_unit_circle.
Definition positions.hpp:47
arma::mat nodes
Moved node locations, n_codes × n_dims.
Definition positions.hpp:48
arma::mat centroids
Centroids recomputed from the moved nodes, n_units × n_dims.
Definition positions.hpp:49
Aggregated result returned by every node-position solver.
Definition positions.hpp:35
arma::mat points
Input rotated points echoed back unchanged, n_units × n_dims.
Definition positions.hpp:39
arma::mat nodes
Solved node locations, n_codes × n_dims.
Definition positions.hpp:36
arma::mat centroids
Per-unit centroids projected onto the node space, n_units × n_dims.
Definition positions.hpp:37
arma::mat weights
Normalised half-edge weight per unit per node, n_units × n_codes.
Definition positions.hpp:38
Aggregated result returned by every rotation routine.
Definition rotation.hpp:33
arma::vec eigenvalues
Length-p vector of sdev^2 values, matching rENA's convention.
Definition rotation.hpp:35
std::vector< std::string > column_names
Axis labels, e.g. "MR1", "SVD2", "GMR1".
Definition rotation.hpp:36
arma::mat rotation
p x p orthogonal matrix; column j is rotation axis j.
Definition rotation.hpp:34