![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Boundary marshalling for host bindings (MATLAB MEX, pybind11, the JSON CLI). More...
#include <cstddef>#include <string>#include <vector>#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::io::ExactValue |
| An exact scalar as it crosses to a host without a rational type: the two decimal integer strings, plus the double a host can use directly. More... | |
Namespaces | |
| namespace | line |
| namespace | line::io |
Functions | |
| template<class T, class S> | |
| Matrix< T > | line::io::from_column_major (const S *data, std::size_t rows, std::size_t cols) |
| Build a Matrix from a column-major host buffer (MATLAB's mxGetPr layout, numpy's order='F'). | |
| template<class T, class S> | |
| Matrix< T > | line::io::from_row_major (const S *data, std::size_t rows, std::size_t cols) |
| Build a Matrix from a row-major host buffer (numpy's default order='C'). | |
| template<class T> | |
| void | line::io::to_column_major (const Matrix< T > &m, double *out) |
| Write a Matrix into a column-major host buffer, as doubles. | |
| template<class T> | |
| void | line::io::to_host (const std::vector< T > &v, double *out) |
| Write a vector into a host buffer, as doubles. | |
| template<class T> | |
| std::string | line::io::exact_numerator (const T &) |
| Numerator of an exact value as a decimal string; empty for inexact types. | |
| template<class T> | |
| std::string | line::io::exact_denominator (const T &) |
| template<class T> | |
| ExactValue | line::io::marshal_scalar (const T &v) |
| Marshal any T; only the exact instantiation fills numerator/denominator. | |
| template<> | |
| std::string | line::io::exact_numerator< Rational > (const Rational &v) |
| template<> | |
| std::string | line::io::exact_denominator< Rational > (const Rational &v) |
| const char * | line::io::error_id (const Error &e) |
| Stable identifier for an error, for mexErrMsgIdAndTxt and for mapping to a host exception class. | |
Boundary marshalling for host bindings (MATLAB MEX, pybind11, the JSON CLI).
Three things every binding needs and none of them should reinvent:
Definition in file marshal.h.