Description

一個不需要, 也不應該先compile成obj files的templates.

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:

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

設置, 以下幾點個人覺得比較重要的

Note
config$(config_path) 是一個環境變數, 代表這個configure file所在位置 呼叫asciidoc時必須有設置這個環境變數
header.html

HTML output 的開頭 沒有更動

HTML output 的結尾 沒有更動

logo.png

就是logo

stylesheet.css

HTML output 的css樣式, 我把他改成暗色系了

以下是更動的地方:

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_Spaceint 存資料, 每個channel數值合法範圍是 0~255

  • meow::RGBf_Spacedouble 存資料, 每個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_Spacedouble 存資料, 每個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_Spacedouble 存資料, 每個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_Spacedouble 存資料, 每個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 相關題目

Name Problem Link Status Time source

KD_Tree

Retrenchment

NTU-OJ ACM-ICPC Live

Accept

0.083/0.083

codepad

VP_Tree

Retrenchment

NTU-OJ ACM-ICPC Live

Accept

0.516/0.516

codepad

SplayTree + SegmentTree

Shuffling_cards

NTU-OJ SPOJ

Accept/TLE

6.910/---

codepad

SplayTree + BinaryIndexTree

Shuffling_cards

NTU-OJ SPOJ

Accept/Accept

5.480/44.35

codepad

Bug Report / Contact

  • E-Mail: cat.hook31894 ~在~ gmail.com

  • GitHub