diff options
author | cathook <b01902109@csie.ntu.edu.tw> | 2014-09-24 13:37:42 +0800 |
---|---|---|
committer | cathook <b01902109@csie.ntu.edu.tw> | 2014-09-29 16:55:57 +0800 |
commit | 8b76fbb408f8eedab24195655c45c891af01eaab (patch) | |
tree | 414d7fc87885cb77e181a3ab99e334b837621036 /README.asciidoc | |
parent | ef9af0d577c3a6b5d11fdeed7a9149d09973171b (diff) | |
download | meow-8b76fbb408f8eedab24195655c45c891af01eaab.tar meow-8b76fbb408f8eedab24195655c45c891af01eaab.tar.gz meow-8b76fbb408f8eedab24195655c45c891af01eaab.tar.bz2 meow-8b76fbb408f8eedab24195655c45c891af01eaab.tar.lz meow-8b76fbb408f8eedab24195655c45c891af01eaab.tar.xz meow-8b76fbb408f8eedab24195655c45c891af01eaab.tar.zst meow-8b76fbb408f8eedab24195655c45c891af01eaab.zip |
Big change, detail see README.
Diffstat (limited to 'README.asciidoc')
-rw-r--r-- | README.asciidoc | 918 |
1 files changed, 163 insertions, 755 deletions
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` 生成 *'<TARGET>'.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=<name> [OBJS=<OBJ_FILES> LIBS=<LIBRARIES>]` + -新增一個target, 須給定目標名 , 並且此Makefile會假定 `main() { ... }` 放在 -'src/<name>.cpp' 而最終輸出會是 'bin/<name>' . + -關於 'OBJS=' 與 'LIBS=' 參考下面說明 - -* `make add NAME=<name> [OBJS=<OBJ_FILES> LIBS=<LIBRARIES>]` + -針對target為 '<name>' 的目標新增需要的 '<OBJ_FILES>' , 與 '<LIBRARIES>'. -'<LIBRARIES>' 的部份會用 `pkg-config` 去解讀, 例如 '<LIBRARIES>' 為 -'opencv lapackpp' 則link時會被以下指令展開 + -`pkg-config --libs opencv lapackpp` + -而 '<OBJ_FILES>' 的部份則只需要給 *name* 就好, 不需要有完整個 pathname, 例如 -例如 '<OBJ_FILES>' 是 '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=<name> [OBJS=<OBJ_FILES> LIBS=<LIBRARIES>]` + -與 add相反, 嘗試將指定target所需的'<OBJ_FILES>'和'<LIBRARIES>'移除 - -* `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<T>` *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<Value>` - -===== DisjointSet.h - -用來維護一堆互斥集的資訊. - -.Classes -* `meow::DisjointSet` - -===== HashTable.h - -就是傳說中的HashTable - -.Classes -* `meow::HashTableList<Data, HashFunc>` - -===== KD_Tree.h - -查詢第k近鄰居用的 - -.Classes -* `meow::KD_Tree<Vector>` - -===== MergeableHeap.h - -可合併Heap - -.Classes -* `meow::MergeableHeap<Element>` - -===== SegmentTree.h - -線段樹 -.Classes -* `meow::SegmentTree<Value>` - -===== SplayTree.h - -伸展樹, 比一般平衡樹稍強的東東 -* `meow::SplayTree<Key, Value>` -* `meow::SplayTree_Range<Key, Value>` - -===== VP_Tree.h - -查詢第k近鄰居用的 - -.Classes -* `meow::VP_Tree<Vector>` - -==== geo/ - -計算幾何相關, 算是從math中特化出來的 - -===== Vectors.h - -實作上不是用陣列, 是直接宣告2到3個變數分別存x, y (,z) - -.Classes -* `meow::Vector2D<Scalar>` -* `meow::Vector3D<Scalar>` - - - -==== math/ - - -===== utility.h - -數學相關的小 function 雜七雜八的不知道歸類何處 - -.Functions -* noEPS() -* normalize() -* denormalize() -* ratioMapping() -* inRange() -* squ() -* cub() -* average() -* average() -* tAbs() - -.Constants -* PI - -===== Matrix.h - -.Classes -* `meow::Matrix<Entry>` - -===== Vector.h - -實作上將 *Matrix* 重新包裝 - -.Classes -* `meow::Vector<Scalar>` - -===== Transformation.h - -各種轉換的 Base Class, 這裡所謂的 *Transformation* 形式上不一定要是 Linear, -但原則上都是 *input a vector, output a vector* 其中input/output的dimension可以 -不同. - -.Classes -* `meow::Transformation<Scalar>` - -===== Transformations.h - -包含各種 *Non-Linear* transformation - -.Classes -* `meow::BallProjection<Scalar>` -* `meow::PhotoProjection<Scalar>` - -===== LinearTransformation.h - -各種 LinearTransformation 的Base Class, 繼承自 `meow::Transformation` - -.Classes -* `meow::LinearTransformation<Scalar>` - -===== LinearTransformations.h - -各種 *Linear* Transformation - -.Classes -* `meow::Rotation3D<Scalar>` - -===== 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<SID>` - - -== Test -=== ACM 相關題目 -[options="header",width="70%",cols="3<s,3<,4^,1^,1<,2^m",grid="rows"] -|======================================================================= -| Name | Problem | Link | Status | Time | source -| KD_Tree | 'Retrenchment' | -http://acm.csie.org/ntujudge/problem.php?id=1971[NTU-OJ] -https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4052[ACM-ICPC Live] -| Accept | 0.083/0.083 | http://codepad.org/U85ruse5[codepad] - - -| VP_Tree | 'Retrenchment' | -http://acm.csie.org/ntujudge/problem.php?id=1971[NTU-OJ] -https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4052[ACM-ICPC Live] -| Accept | 0.516/0.516 | http://codepad.org/03dW6ZHV[codepad] - - -| SplayTree + SegmentTree | 'Shuffling_cards' | -http://acm.csie.org/ntujudge/problem.php?id=1353[NTU-OJ] -http://www.spoj.com/problems/SHUFFLEK/[SPOJ] -| Accept/TLE | 6.910/--- | http://codepad.org/yUeiVZc0[codepad] - -| SplayTree + BinaryIndexTree | 'Shuffling_cards' | -http://acm.csie.org/ntujudge/problem.php?id=1353[NTU-OJ] -http://www.spoj.com/problems/SHUFFLEK/[SPOJ] -|Accept/Accept|5.480/44.35| http://codepad.org/GAWjEtmq[codepad] - - - -|======================================================================= - - - - -== Bug Report / Contact - * E-Mail: cat.hook31894 \~在~ gmail.com - * GitHub +== Introduction + +Template *Meow* is a set of templates in multiple programming language. Most of +them doesn't need to compile before using, developer can just include it to get +the classes/functions in it. + +=== Git branches: + +* master: The release version, which doesn't not contain the testing code. +* develop: It's contains all the source in this project, includes testing code + and the documents generated by doxygen in addition. + +=== Brief introduction about File Tree: + +* '.doxygen/' Data for generating the documents of this project. +* '.readme/' Data for generating the readme file. +* 'doc/' Contains the documents of this project. +** 'html/' Documents in HTML format. +*** 'index.html' Home page. +* 'moewpp/' C++ Templates. +** '...' (See below for detail introduction) +* 'meowpp_unittest/' Unittest code for meowpp. +* 'meowjs/' JS library (Not implement yet). +** '...' (See below for detail introduction) +* 'meowjs_unittest/' Unittest code for meowjs. + + +== Meowpp + +=== Introduction + +TODO(cathook): Fill it. + +=== 'meowpp/algo/' + +* 'levenberg_marquardt.h' +* 'pla.h' +* 'ppla.h' +* 'rasnac.h' + +=== 'meowpp/debug/' + +* 'assert.h' + +=== 'meowpp/ds/' + +* 'binary_index_tree.h' +* 'disjoint_set.h' +* 'half_plane.h' +* 'hash_table.h' +* 'kd_tree.h' +* 'mergeable_heap.h' +* 'segment_tree.h' +* 'splay_tree.h' +* 'treap.h' +* 'vp_tree.h' + +=== 'meowpp/geo/' + +* 'ball.h' +* 'circle.h' +* 'convex_mash.h' +* 'convex_polygon.h' +* 'line_segment.h' +* 'mash3.h' +* 'plane.h' +* 'polygon.h' +* 'radial.h' +* 'simple_polygon.h' +* 'oper/' +** 'intersection.h' +** 'union.h' +** 'minus.h' +** 'area.h' +** 'convex_hull.h' +* 'vector2d.h' +* 'vector3d.h' +* 'voronoi.h' + +=== 'meowpp/math/' + +* 'matrix.h' +* 'oper/' +** 'gaussian_elimination.h' +** 'ldu_factor.h' +** 'trans/' +*** 'transformation.h' +*** 'ball_projection.h' +*** 'linear_projection.h' +*** 'offset.h' +*** 'photo_porjection.h' +*** 'rotation2d.h' +*** 'rotation3d.h' +*** 'scale.h' +* 'vector.h' + +=== 'meowpp/tools/' + +* 'usage.h' + +=== 'meowpp/utility/' + +* 'factory.h' +* 'object.h' +* 'operation.h' +* 'pointer.h' +* 'self.h' +* 'state.h' + +=== 'meowpp/gra/' + +* 'images/' +** 'image.h' +** 'bmp.h' +** 'jpg.h' +** 'pyramid.h' +** 'oper/' +*** 'bmp_to_jpg.h' +*** 'dog.h' +*** 'find_features/' +**** 'harris_corner_detect.h' +**** 'sift.h' +*** 'gaussian_blur.h' +*** 'log.h' +* 'pixel3/' +** 'pixel3.h' +** 'rgb_f.h' +* 'pixel4/' +** 'pixel4.h' +** 'rgba_f.h' + + +== Testing + +TODO(cathook): Fill it. + +== Copyright + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. + + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see <http://www.gnu.org/licenses/>. + + +== Authors/Bug Report + +=== cathook + +- E-mail: cat.hook <AT> 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 |