LMCAS
Lamina Computer Algebra System
载入中...
搜索中...
未找到
vector_calculus_matrices.hpp
浏览该文件的文档.
1#pragma once
2
4
5namespace LMCAS {
6
7/**
8 * @brief 计算向量值函数的雅可比矩阵。
9 *
10 * 返回 m×n 的 MatrixNode,其中 entry(i,j) = ∂fᵢ/∂xⱼ。
11 * 支持非方阵(m 个函数,n 个变量)。
12 *
13 * @param[in] functions 函数列表 (f₁, f₂, ..., fₘ)
14 * @param[in] vars 变量名列表 (x₁, x₂, ..., xₙ)
15 * @return 包含 MatrixNode 的 SymbolicExpr
16 */
18 const std::vector<std::shared_ptr<SymbolicExpr>>& functions,
19 const std::vector<std::string>& vars,
21
22/** @brief 使用默认计算上下文计算雅可比矩阵,并报告无效输入。 */
24 const std::vector<std::shared_ptr<SymbolicExpr>>& functions,
25 const std::vector<std::string>& vars);
26LMCAS_API std::shared_ptr<SymbolicExpr> jacobian(
27 const std::vector<std::shared_ptr<SymbolicExpr>>& functions,
28 const std::vector<std::string>& vars);
29
30
31/**
32 * @brief 计算标量函数的海森矩阵。
33 *
34 * 返回对称的 n×n MatrixNode,其中 entry(i,j) = ∂²f/(∂xᵢ∂xⱼ)。
35 *
36 * @param[in] f 标量函数表达式
37 * @param[in] vars 变量名列表 (x₁, x₂, ..., xₙ)
38 * @return 包含 MatrixNode 的 SymbolicExpr
39 */
41 const std::shared_ptr<SymbolicExpr>& f,
42 const std::vector<std::string>& vars,
44
45/** @brief 使用默认计算上下文计算海森矩阵,并报告无效输入。 */
47 const std::shared_ptr<SymbolicExpr>& f,
48 const std::vector<std::string>& vars);
49LMCAS_API std::shared_ptr<SymbolicExpr> hessian(
50 const std::shared_ptr<SymbolicExpr>& f, const std::vector<std::string>& vars);
51
52}
#define LMCAS_API
std::shared_ptr< SymbolicExpr > hessian(const std::shared_ptr< SymbolicExpr > &f, const std::vector< std::string > &vars)
const std::vector< Polynomial< BigInt > > const BigInt ComputationContext & context
__attribute__((visibility("default"))) VectorCalculusFieldResult gradient_checked(const std __attribute__((visibility("default"))) VectorCalculusFieldResult gradient_checked(const std __attribute__((visibility("default"))) VectorField gradient(const std const std::vector< std::string > & vars
std::shared_ptr< SymbolicExpr > jacobian(const std::vector< std::shared_ptr< SymbolicExpr > > &functions, const std::vector< std::string > &vars)
VectorCalculusExprResult hessian_checked(const std::shared_ptr< SymbolicExpr > &f, const std::vector< std::string > &vars, ComputationContext &context)
VectorCalculusExprResult jacobian_checked(const std::vector< std::shared_ptr< SymbolicExpr > > &functions, const std::vector< std::string > &vars, ComputationContext &context)
Result< std::shared_ptr< SymbolicExpr > > VectorCalculusExprResult