libena 0.4.18-dev.9021
QE C++ library
Loading...
Searching...
No Matches
emscripten.hpp File Reference

Plain-data packers for libena results in Emscripten (Embind) bindings. More...

#include <libqe/bind/emscripten.hpp>
#include <libena/rotation.hpp>
#include <libena/positions.hpp>
#include <libena/ccd.hpp>
#include <emscripten/val.h>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  qe
 
namespace  qe::bind
 
namespace  qe::bind::js
 

Functions

inline ::emscripten::val qe::bind::js::vec_to_js_array (const arma::vec &v)
 arma::vec → plain JS number[]
 
inline ::emscripten::val qe::bind::js::to_js (const qe::RotationResult &r)
 
inline ::emscripten::val qe::bind::js::to_js (const qe::NodePositions &r)
 
inline ::emscripten::val qe::bind::js::to_js (const qe::MovedNodes &r)
 
inline ::emscripten::val qe::bind::js::to_js (const qe::CCDResult &r)
 

Detailed Description

Plain-data packers for libena results in Emscripten (Embind) bindings.

Results cross the boundary as plain JS objects, not registered Embind classes, matching libqe-wasm's conventions:

RotationResult → { rotation: {data, rows, cols}, eigenvalues: number[], column_names: string[] } NodePositions → { nodes, centroids, weights, points } (each {data, rows, cols}) MovedNodes → { nodes, centroids } (each {data, rows, cols}) CCDResult → { window_size, peak_lag, lag, frob, frob_sq_unbiased, frob_unbiased_signed, total_weight } (curves: number[])

Requires Emscripten; never included by libena.hpp. Array conversion comes from libqe/bind/emscripten.hpp.