Skip to Main Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate content levelBeginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
120
|
第三章
將位元串列轉換為位元向量
建立指定長度的位元向量,向量元的初始值為0
將指定位址的向量元從0設為1
取出向量的第一個位元值
使用除了第一個位元外的其他向量位元,建立新的向量
取出指定位址的位元
取出向量位元的長度
對兩個位元向量執行相對應位元的AND運算
對兩個位元向量執行相對應位元的OR運算
輸出位元向量的補向量(NOT)
建立位元向量的簡潔輸出格式
以下提供幾個使用範例。[Page-120]
ch03.indd 120 2014/4/2 上午 05:19:16
3.11 使用串列實作樹狀結構及其遊歷方式
|
121
討論說明
即使你沒有位元向量的使用需求,本文仍提供了相當有用的資訊:建立自訂物件,並且
能夠整合至 Mathematica 的內建指令。[Page-121]
延伸資訊
關於
Format
的詳細用法,請見 Mathematica 教學文件:
tutorial/DefiningOutputFormats
3.11 使用串列實作樹狀結構及其遊歷方式
問題點
你想在 Mathematica 中建立樹狀結構模型,並且實作常見的樹狀結構演算法。
解決方案
最簡單的樹狀結構是二元樹,而 Mathematica 中最簡單的二元樹模型便是使用串列,串
列中包含了左分支、節點值與右分支。
makeTree 指令建立空結構或 ...
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.
Start your free trial

You might also like

Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull

Publisher Resources

ISBN: 9789863470106