|
Janus 2.0.0
High-performance C++20 dual-mode numerical framework
|
IO Utilities and Traits for Janus. More...
#include "janus/core/JanusError.hpp"#include "janus/core/JanusTypes.hpp"#include <Eigen/Dense>#include <casadi/casadi.hpp>#include <cstdlib>#include <fstream>#include <iomanip>#include <iostream>#include <limits>#include <map>#include <set>#include <sstream>#include <vector>

Go to the source code of this file.
Namespaces | |
| namespace | janus |
| namespace | janus::detail |
| Smooth approximation of ReLU function: softplus(x) = (1/beta) * log(1 + exp(beta * x)). | |
Enumerations | |
| enum class | janus::DeepGraphFormat { janus::DOT , janus::HTML , janus::PDF } |
| Export format for deep graph visualization. More... | |
Functions | |
| template<typename Derived> | |
| void | janus::print (const std::string &label, const Eigen::MatrixBase< Derived > &mat) |
| Print a matrix to stdout with a label. | |
| template<typename Derived> | |
| void | janus::disp (const std::string &label, const Eigen::MatrixBase< Derived > &mat) |
| Deprecated alias for print. | |
| template<typename Derived> | |
| auto | janus::eval (const Eigen::MatrixBase< Derived > &mat) |
| Evaluate a symbolic matrix to a numeric Eigen matrix. | |
| double | janus::eval (const SymbolicScalar &val) |
| Evaluate a symbolic scalar to a double. | |
| template<typename T, std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> | |
| T | janus::eval (const T &val) |
| Passthrough eval for numeric types. | |
| std::string | janus::detail::escape_dot_label (const std::string &s) |
| Escape special characters for DOT format. | |
| std::string | janus::detail::get_op_name (const SymbolicScalar &mx) |
| Get a short description of an MX operation type. | |
| void | janus::export_graph_dot (const SymbolicScalar &expr, const std::string &filename, const std::string &name="expression") |
| Export a symbolic expression to DOT format for visualization. | |
| bool | janus::render_graph (const std::string &dot_file, const std::string &output_file) |
| Export a janus::Function to DOT format for visualization. | |
| bool | janus::visualize_graph (const SymbolicScalar &expr, const std::string &output_base) |
| Convenience function: export expression to DOT and render to PDF. | |
| std::string | janus::detail::escape_for_js (const std::string &content) |
| Escape a string for embedding in a JavaScript string literal. | |
| std::string | janus::detail::escape_for_json (const std::string &s) |
| Escape a string for embedding in JSON. | |
| void | janus::detail::write_graph_html (std::ostream &out, const std::string &title, const std::string &escaped_dot, const std::string &node_data_json, const std::string &edges_json, const std::string &extra_header_js="") |
| Write a complete interactive graph HTML page. | |
| void | janus::export_graph_html (const SymbolicScalar &expr, const std::string &filename, const std::string &name="expression") |
| Export a symbolic expression to an interactive HTML file. | |
| std::string | janus::detail::get_sx_operation (const casadi::SXElem &elem) |
| Map CasADi SX operation codes to readable labels. | |
| void | janus::detail::get_sx_node_style (const casadi::SXElem &elem, std::string &color, std::string &shape) |
| Get node styling based on SX element type. | |
| void | janus::export_sx_graph_dot (const casadi::SX &expr, const std::string &filename, const std::string &name="expression") |
| Export an SX expression to DOT format for deep visualization. | |
| void | janus::export_sx_graph_html (const casadi::SX &expr, const std::string &filename, const std::string &name="expression") |
| Export an SX expression to an interactive HTML file for deep visualization. | |
| void | janus::export_graph_deep (const casadi::Function &fn, const std::string &filename, DeepGraphFormat format=DeepGraphFormat::HTML, const std::string &name="") |
| Export a CasADi Function to deep graph format showing all operations. | |
| bool | janus::visualize_graph_deep (const casadi::Function &fn, const std::string &output_base) |
| Convenience function: export Function to deep graph and render to PDF. | |
IO Utilities and Traits for Janus.
Provides:
Note: Eigen::NumTraits definitions are in JanusTypes.hpp usually.