From 8b76fbb408f8eedab24195655c45c891af01eaab Mon Sep 17 00:00:00 2001 From: cathook Date: Wed, 24 Sep 2014 13:37:42 +0800 Subject: Big change, detail see README. --- README.asciidoc | 918 ++++++++++---------------------------------------------- 1 file changed, 163 insertions(+), 755 deletions(-) (limited to 'README.asciidoc') diff --git a/README.asciidoc b/README.asciidoc index 7b50130..27cf6d1 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -1,762 +1,170 @@ = meow - -== Description -一個不需要, 也不應該先compile成obj files的templates. - .Links * https://github.com/cathook/meow[GitHub] * http://www.csie.ntu.edu.tw/~b01902109/readme/template_meow/README.html[README.html] * https://github.com/cathook/meow/archive/master.zip[Download] -== File Tree - - - -=== LaTex/ - - -LaTex 相關模板 - -===== Makefile - -環境變數: - -* `SOURCE = source.tex` 設定 'LaTex' 源碼檔名 -* `TARGET = output` 設定生出來的 *pdf* 檔名 - -[NOTE] -`TARGET` 不需要給副檔名 - -targets: - -* `all` 生成 *''.pdf* -* `view` 用kde-open 把輸出結果開起來(如有需要會先重新編譯) -* `clean` 清除 -* `two` 編譯兩次, 如果有目錄的話可能會需要用到 - -===== source.tex - -內容為一些我自己定義的設定, 參數設置等等. 另外還有用寫在註解裡面的小筆記 - - - -=== asciidoc/ - -一些關於asciidoc的example與編譯設定 - -===== Makefile - -編譯asciidoc用的, 裡面有兩個環境變數: - -- ASCIIDOC_SOURCE: 指定原始碼, 預設為 'example.txt' -- ASCIIDOC_OUTPUT: 輸出的檔名, 預設為 'output.html' - -另外還有一個target: - -[source,makefile] ---------------- -$(ASCIIDOC_OUTPUT): $(ASCIIDOC_SOURCE) ---------------- - - - -=== cppMakefile/ - - - -.Description - -這是一個簡單的 *GNU makefile for 'C++' project* -類似AutoTool等工具, 不過又更簡化了, 操作方法是利用GNUMakefile裡的targets -當作指令, 生出一個targets檔, 以後鍵入 `make all` 就會自動把所有targets都 -編譯出來. - -.Commands - -* `make init` + -初始化, 設定完之後所在位置會多幾個資料夾如下 - -** 'bin/' 放編譯出來的執行檔 -** 'dep/' dependency相關資料, 內容會自動生成, 不用理它 -** 'inc/' 自定義的include file放置位置 -** 'src/' source code放置位置 -** 'obj/' obj file放置位置, 會自動生成, 不用理它 - -* `make new NAME= [OBJS= LIBS=]` + -新增一個target, 須給定目標名 , 並且此Makefile會假定 `main() { ... }` 放在 -'src/.cpp' 而最終輸出會是 'bin/' . + -關於 'OBJS=' 與 'LIBS=' 參考下面說明 - -* `make add NAME= [OBJS= LIBS=]` + -針對target為 '' 的目標新增需要的 '' , 與 ''. -'' 的部份會用 `pkg-config` 去解讀, 例如 '' 為 -'opencv lapackpp' 則link時會被以下指令展開 + -`pkg-config --libs opencv lapackpp` + -而 '' 的部份則只需要給 *name* 就好, 不需要有完整個 pathname, 例如 -例如 '' 是 'a b c' 則此makefile會視為 - -** source code: 'src/a.cpp src/b.cpp src/c.cpp' -** obj file: 'obj/a.o obj/b.o obj/c.o' - -* `make del NAME= [OBJS= LIBS=]` + -與 add相反, 嘗試將指定target所需的''和''移除 - -* `make clean` + -將 'bin/*' 'dep/*' 'obj/*' 清除, 有時候覺得dependency怪怪的 -時可以嘗試執行此指令 - -[NOTE] -其中整個project到底有哪些obj file會完全依照 *src/* 裡面有哪些 `.cpp` 檔決定 - -===== GNUMakefile - -就是一個 Makefile, 不過裡面有些東西是 `GNU-make` only的 - -===== GNUMakefile.dependency.bash - -產生 dependency檔用的 - - - -=== doxygen/ - - -doxygen 相關設定 - -===== Makefile - -編譯doxygen document的Makefile, 裡面只有一個target: 'document', -另外有兩個環境變數: - -- DOXYGEN_RUN_PATH: 指定doxygen執行的pwd, 預設為 `pwd` -- DOXYGEN_CONFIG: 指定config檔放在哪裡, 預設為 `pwd` - -===== config - -設置, 以下幾點個人覺得比較重要的 - -[source,conf] -------------------------- - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "Templates -- Meow" -PROJECT_NUMBER = 1.1.2 -PROJECT_BRIEF = 不能, 也不應該先編譯成obj-file的templates -PROJECT_LOGO = $(config_path)/logo.png -OUTPUT_DIRECTORY = doc -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -TAB_SIZE = 2 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = NO -EXTRACT_LOCAL_CLASSES = YES -FORCE_LOCAL_INCLUDES = YES - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = meowpp -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = -RECURSIVE = YES - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = $(config_path)/header.html -HTML_FOOTER = $(config_path)/footer.html -HTML_STYLESHEET = $(config_path)/stylesheet.css -HTML_EXTRA_STYLESHEET = $(config_path)/custom.css -HTML_EXTRA_FILES = -HTML_COLORSTYLE_HUE = 120 -HTML_COLORSTYLE_SAT = 36 -HTML_COLORSTYLE_GAMMA = 166 -DISABLE_INDEX = YES -GENERATE_TREEVIEW = YES -FORMULA_FONTSIZE = 11 -SEARCHENGINE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_CMD_NAME = xelatex -PAPER_TYPE = letter -HIDE_UNDOC_RELATIONS = NO -UML_LOOK = YES -EXTRA_PACKAGES = -LATEX_HEADER = $(config_path)/header.tex -LATEX_FOOTER = $(config_path)/footer.tex - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CALL_GRAPH = YES -CALLER_GRAPH = YES -------------------------- - -[NOTE] -'config' 中 `$(config_path)` 是一個環境變數, 代表這個configure file所在位置 -*呼叫asciidoc時必須有設置這個環境變數* - - -===== header.html - -*HTML* output 的開頭 -沒有更動 - -===== footer.html - -*HTML* output 的結尾 -沒有更動 - -===== logo.png - -就是logo - - -===== stylesheet.css - -*HTML* output 的css樣式, 我把他改成暗色系了 - -以下是更動的地方: -[source,css] ----------------------------------------------- -body, table, div, p, dl { - font: 400 14px/19px Roboto,sans-serif,monospace; -} - -.title { - line-height: 100%; - font-size: 200%; - margin : 0px; - padding: 0px; - border : 0px; -} - -dt { - color: #999999; - font-style:italic; -} - -div.qindex, div.navtab{ - background-color: #2B3F26; -} - -a { - color: #5D77AC; -} - -.contents a:visited { - color: #7695D2; -} - -a.code, a.code:visited { - color: #7695D2; -} - -a.codeRef, a.codeRef:visited { - color: #7695D2; -} - -pre.fragment { - background-color: #0B0C0D; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; -} - -div.fragment { - background-color: #0B0C0D; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; -} - -div.line { - font-family: 'courier new', monospace, fixed; - color: #B0B0B0; - font-size: 14px; - min-height: 14px; -} - -span.lineno { - color: #909090; - background-color: #181818; -} -span.lineno a { - background-color: #3B3838; -} - -span.lineno a:hover { - background-color: #6B6868; -} - -body { - background-color: #212131; - color: #DDFFDD; -} - -span.keyword { - color: #00A000 -} - -span.keywordtype { - color: #907050 -} - -span.comment { - color: #808080 -} - -span.stringliteral { - color: #904090 -} - -span.charliteral { - color: #904090 -} - -div.center img { - padding: 7px; - background-color: #5F5572; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; -} - -table.memberdecls { - border-top-color: #111111; -} - -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #192322; -} - -.mdescLeft, .mdescRight { - color: #CCCCCC; -} - -.memTemplParams { - color: #7695D2; -} - -.memtemplate { - color: #7695D2; -} - -.memproto, dl.reflist dt { - color: #758575; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.95); - /* background-image:url('nav_f.png'); */ - background-color: #181C28; -} - -.memdoc, dl.reflist dd { - /* background-image:url('nav_g.png'); */ - background-color: #212A31; -} - -.params .paramdir { - color:#A0AA00; -} - -.directory tr.even { - background-color: #272838; -} - -.directory .levels span { - color: #5D77AC; -} - -.fieldtable th { - /* background-image:url('nav_f.png'); */ - /* background-repeat:repeat-x; */ - background-color: #888E99; -} - -div.header -{ - /* background-image:url('nav_h.png'); */ - /* background-repeat:repeat-x; */ - background-color: #290A1C; - padding: 0px; - margin : 0px; - border : 0px; - margin-top: 10px; - border-bottom: 1px solid #AA0000;/*#C4CFE5;*/ -} - -div.headertitle -{ - padding: 5px; - margin : 0px; - border : 0px; -} - -#projectname -{ - font: 400% Tahoma, Arial,sans-serif,monospace; -} - -div.toc h3 { - color: #7695D2; -} - -#powerTip { - background-color: #050505; -} - ----------------------------------------------- - -===== custom.css - -*HTML* output 的css樣式, 在這邊設定的話連 'navtree' 等都可以設定. + -另外這個檔案的檔名不能是 `navtree.css` , 不知道是不是bug. - -===== header.tex - -*LaTex* output 的開頭 - -===== header.tex - -*LaTex* output 的結尾 - -===== stylesheet.sty - -*LaTex* 的樣式設定 - - -=== meowpp/ - -meow for *C++ templates* - - -===== Self.h - -包含一個具有 *Copy On Write* 技術的 'class' 而且有實作 *by reference* , -基本上就是改良C\+\+原本的 reference 機制, 原本的 reference 只能在宣告的時候 -指定參照指向的變數, -而這邊則可以動態改變 - - -===== Usage.h - -方便user製作還算精美的 *usage document* 並且利用 `getopt()` 實作讀入參數與分析 - -===== utility.h - -一些不知道要歸類到哪的小functions - - -==== colors/ - - -一些 *color space* 以及這些space的 *transformate function* 都放在這資料夾下 - -[NOTE] -目前transformation function的準確率還很低, 有待以後加強 - -===== Color3_Space.h - -`class Color3_Space` *Channel Number = 3* 的 Color Space 的共通 *Base class* - -===== RGB_Space.h - -Channel分別是 - -* Red -* Green -* Blue - -.Classes -* `meow::RGBi_Space` 用 'int' 存資料, 每個channel數值合法範圍是 *0~255* -* `meow::RGBf_Space` 用 'double' 存資料, 每個channel數值合法範圍是 *0.0~1.0* - -.Functions -* `meow::colorTransformation(in, *out)` for -** RGBi_Space <--> RGBf_Space - -===== YUV_Space.h - -Channel分別是 - -* Y 明度 -* U 色度 -* V 濃度 - -.Classes -* `meow::YUVf_Space` 用 'double' 存資料, 每個channel數值合法範圍是 *0~1.0* - -.Functions -* `meow::colorTransformation(in, *out)` for -** YUVf_Space <--> RGBi_Space -** YUVf_Space <--> RGBf_Space - -===== HSL_Space.h - -Channel分別是 - -* H 色調 -* S 飽和度 -* L 亮度 - -.Classes -* `meow::HSLf_Space` 用 'double' 存資料, 每個channel數值合法範圍是 *0~1.0* - -.Functions -* `meow::colorTransformation(in, *out)` for -** HSLf_Space <--> RGBi_Space -** HSLf_Space <--> RGBf_Space -** HSLf_Space <--> YUVf_Space - -===== HSV_Space.h - -Channel分別是 - -* H 色調 -* S 飽和度 -* V 亮度 - -.Classes -* `meow::HSVf_Space` 用 'double' 存資料, 每個channel數值合法範圍是 *0~1.0* - -.Functions -* `meow::colorTransformation(in, *out)` for -** HSVf_Space <--> RGBi_Space -** HSVf_Space <--> RGBf_Space -** HSVf_Space <--> YUVf_Space -** HSVf_Space <--> HSLf_Space - - -==== dsa/ - - -包含一些資料結構 - -===== BinaryIndexTree.h - -極度簡化的 *SegmentTree* 已無區間更新的操作. - -.Classes -* `meow::BinaryIndexTree` - -===== DisjointSet.h - -用來維護一堆互斥集的資訊. - -.Classes -* `meow::DisjointSet` - -===== HashTable.h - -就是傳說中的HashTable - -.Classes -* `meow::HashTableList` - -===== KD_Tree.h - -查詢第k近鄰居用的 - -.Classes -* `meow::KD_Tree` - -===== MergeableHeap.h - -可合併Heap - -.Classes -* `meow::MergeableHeap` - -===== SegmentTree.h - -線段樹 -.Classes -* `meow::SegmentTree` - -===== SplayTree.h - -伸展樹, 比一般平衡樹稍強的東東 -* `meow::SplayTree` -* `meow::SplayTree_Range` - -===== VP_Tree.h - -查詢第k近鄰居用的 - -.Classes -* `meow::VP_Tree` - -==== geo/ - -計算幾何相關, 算是從math中特化出來的 - -===== Vectors.h - -實作上不是用陣列, 是直接宣告2到3個變數分別存x, y (,z) - -.Classes -* `meow::Vector2D` -* `meow::Vector3D` - - - -==== math/ - - -===== utility.h - -數學相關的小 function 雜七雜八的不知道歸類何處 - -.Functions -* noEPS() -* normalize() -* denormalize() -* ratioMapping() -* inRange() -* squ() -* cub() -* average() -* average() -* tAbs() - -.Constants -* PI - -===== Matrix.h - -.Classes -* `meow::Matrix` - -===== Vector.h - -實作上將 *Matrix* 重新包裝 - -.Classes -* `meow::Vector` - -===== Transformation.h - -各種轉換的 Base Class, 這裡所謂的 *Transformation* 形式上不一定要是 Linear, -但原則上都是 *input a vector, output a vector* 其中input/output的dimension可以 -不同. - -.Classes -* `meow::Transformation` - -===== Transformations.h - -包含各種 *Non-Linear* transformation - -.Classes -* `meow::BallProjection` -* `meow::PhotoProjection` - -===== LinearTransformation.h - -各種 LinearTransformation 的Base Class, 繼承自 `meow::Transformation` - -.Classes -* `meow::LinearTransformation` - -===== LinearTransformations.h - -各種 *Linear* Transformation - -.Classes -* `meow::Rotation3D` - -===== methods.h - -一些數學方法 - -.Functions -* ransac() -* levenbergMarquardt() - - - -==== oo/ - -物件相關 - -===== ObjBase.h - -.Classes -* `meow::ObjBase` - -===== ObjTypes.h - -.Classes -* `meow::ObjType` -* `meow::ObjInt` -* `meow::ObjSizeT` -* `meow::ObjDouble` -* `meow::ObjString` - -===== ObjArray.h - -.Classes -* `meow::ObjArray` - -===== ObjDictionary.h - -.Classes -* `meow::ObjDictionary` - -===== ObjSelector.h - -.Classes -* `meow::ObjSelector` - - -== Test -=== ACM 相關題目 -[options="header",width="70%",cols="3. + + +== Authors/Bug Report + +=== cathook + +- E-mail: cat.hook gmail.com +- github: https://www.github.com/cathook/meow + +=== cat_leopard + +- E-mail: b01902109 %at% csie.ntu.edu.tw/ +- E-mail: b01902109 %at% ntu.edu.tw -- cgit v1.2.3