Skip to Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
700
|
第十七章
[Page-704]
如 果 想 進 行 Java 函 式 庫 的 實 驗 測 試, 最 好 能 在 Mathematica 內 實 作 函 式 庫 介
面, 這 只 需 使 用
ImplementJavaInterface
指 令 便 可 輕 鬆 達 成。 以 下 範 例 使
用
ImplementJavaInterface
指 令 修 改 背 包 問 題 的 演 化 適 應 函 數; 需 注 意 的 是,
ImplementJavaInterface
指令只 能用在 具體介面 而無法 用於抽 象類別。在 JGAP 中,
FitnessFunction
函式是一個抽象類別,因此我們無法使用
ImplementJavaInterface
指
令進行實作,於此情況下,我們可以用下列方式建立接合程式碼(adapter)。
藉由以上的演化適應函數,讓我們可於 Mathematica 中使用下列介面。
ch17.indd 700 2014/4/2 下午 04:27:24
17.5 呼叫 Java 函式
|
701
[Page-705]
完成上列程式後,我們便能使用 Mathematica 中建立的函數作為演化適應函數,這個方
法是通用的,你可以用這個方法接合 Java 函式庫中的任意抽象類別。以下我們利
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mathematica Cookbook

Mathematica Cookbook

Sal Mangano
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9789863470106