惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
T
The Blog of Author Tim Ferriss
量子位
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
小众软件
小众软件
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
美团技术团队
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
博客园 - 【当耐特】
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security

博客园 - 逍遥子

MSN空间上的以往技术贴整理 C++的多态的被覆盖的问题 类引用机制 - 逍遥子 - 博客园 防止盗链的简单技术 验证码(CAPTCHA)的破解技术 校内网狗狗刷骨机完全版(不再维护) - 逍遥子 - 博客园 HTTP外挂的简单实现 C++的中英文字符串表示(string,wstring) C++学习之2--10.09题目答案 C++学习之一--基本介绍 下面内容为C++的教学 VC6的C++标准支持不完全 XML基础学习1 数论中求公因子、求模逆的算法 QuickSort和MergeSort算法及其效率比较源代码 继承、重载运算符、虚函数与向量、矩阵运算 数据库时间段分组查询解决方法和数据转储方法 Java 通配符匹配查找文件 动态加载Java运行环境和运行实例
Link Java to Maple - 逍遥子
逍遥子 · 2009-04-27 · via 博客园 - 逍遥子

A java project should link to Maple using those math methods.  Step as following.

1. In the maple, get the bin lib path. in windows XP, input:

> kernelopts(bindir);

and I get the answer:  "d:\Program Files\Maple 11\bin.win"

2. Set the path into the windows system path. You can check it with "echo %path%" command.

3. Create the java project, and import the packages: externalcall.jar and jopenmaple.jar in %MAPLE%\java dictionary.

4. Build and run.

I use the %MAPLE%\samples\OpenMaple\Java\jcmaple for test. And that's perfect !

run the sample and input a recursive equation set to get the solution.

> eq[1] := d(0) = d[0];

                             eq[1] := d(0) = d[0]

> eq[2] := d(k+1) = d(k)+1;

                           eq[2] := d(k+1) = d(k)+1

> eq[3] := l1(m+1) = l1(m)+1;

                          eq[3] := l1(m+1) = l1(m)+1

> eq[4] := l2(n+1) = l2(n)+1;

                          eq[4] := l2(n+1) = l2(n)+1

> eq[5] := l1(0) = l1[0];

                            eq[5] := l1(0) = l1[0]

> eq[6] := l2(0) = l2[0];

                            eq[6] := l2(0) = l2[0]

> p := rsolve(convert(eq, set), {d(k), l1(m), l2(n)});

            p := {d(k) = k+d[0], l1(m) = m+l1[0], l2(n) = n+l2[0]}

Maple can convert procedures and data into the languages such as C, Java, BASIC and so on, however it can not convert the kernel funtions like the "rsovle". As a result, it's the only way to use its API.

Ok, I'll use it to solve my complex problems for bug-finding in the software.