From 697558aa430c6bb5e9fb25d39ae9156a4d5403c3 Mon Sep 17 00:00:00 2001 From: cathook Date: Tue, 22 Apr 2014 02:28:31 +0800 Subject: fix readme --- README.asciidoc | 23 ++++++++++++++++++----- README.html | 28 +++++++++++++++++----------- meowpp/Usage.h | 2 ++ meowpp/dsa/MergeableHeap.h | 1 + meowpp/dsa/SegmentTree.h | 3 +++ meowpp/oo/Register_Implement.h | 40 ++++++++++++++++++++-------------------- meowpp/utility.h | 2 ++ 7 files changed, 63 insertions(+), 36 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 9998a00..2fb5df4 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -39,7 +39,11 @@ :b: | + + + === meow:: *Functios* in utility.h + [options="header",width="100%",cols="1>s,5<,1<,10<",grid="rows"] |============================================================== |Name | Parameters | Return_Type | Description @@ -94,6 +98,7 @@ double `u2`) ''' + === meow:: *Usage* (C++ Class) ==== Description `Usage` 是用來分析argc, argv和輸出usage document的class. @@ -156,8 +161,9 @@ String const& value, String const& description)` + ''' + === meow:: *ImplementInterface/RegisterInterface* (C++ Class) -.Description +==== Description Assume there is a problem which can be solved by different algorithms. Then you can write multiple classes to approach this problem. + Now if you want to decide which algorithm to use in runtime, you can just @@ -166,13 +172,16 @@ approach this case by a simple way: * Let all the problem-solving classes inherit from `class ImplementInterface` , and call the constructure with giving `identify` (type `T` ) . -* Create an class inherit from `RegisterInterface` , and register all your -implement class to it by call `regImplement(pointer to the class)`. -* Select which implement class you want by call `getImplement(identify)` , -which will return the pointer to the corresponding class. +* Create an class inherit from `RegisterInterface` , +and register all your implement class to it by call +`regImplement(pointer to the class)`. +* Select which implement class you want by call +`getImplement(identify)` , which will return the pointer +to the corresponding class. ''' + === meow:: *DisjointSet* (C++ class) ==== Description `DisjointSet` 是個*輕量級Data Dtructure*, 用來維護一堆互斥集的資訊. @@ -243,6 +252,7 @@ size_t `number2`)| size_t | very fast |將 `heap2` 的資料統統加到 `this` 中, 並且清空 `heap2` 時間複雜度中的M是 `heap2` 的資料數 |============================================== + [WARNING] ============================================== * 假設現在有兩個MergeableHeap `A` 和 `B`, 則: @@ -458,3 +468,6 @@ Value const& `delta`) |void|O(logN) |將區間 `[first,last]` 全部都加上 `delta` |============================================== + +''' + diff --git a/README.html b/README.html index b2a3db3..59ed324 100644 --- a/README.html +++ b/README.html @@ -1109,7 +1109,9 @@ String const& value, String const& description)

meow:: ImplementInterface/RegisterInterface (C++ Class)

-
Description

Assume there is a problem which can be solved by different algorithms. +

+

Description

+

Assume there is a problem which can be solved by different algorithms. Then you can write multiple classes to approach this problem.
Now if you want to decide which algorithm to use in runtime, you can just approach this case by a simple way:

@@ -1123,23 +1125,26 @@ Let all the problem-solving classes inherit from
  • -Create an class inherit from RegisterInterface<T> , and register all your -implement class to it by call regImplement(pointer to the class). +Create an class inherit from RegisterInterface<T> , +and register all your implement class to it by call +regImplement(pointer to the class).

  • -Select which implement class you want by call getImplement(identify) , -which will return the pointer to the corresponding class. +Select which implement class you want by call +getImplement(identify) , which will return the pointer +to the corresponding class.


  • +

    meow:: DisjointSet (C++ class)

    -

    Description

    +

    Description

    DisjointSet 是個輕量級Data Dtructure, 用來維護一堆互斥集的資訊. 相關資料可參考 演算法筆記

    @@ -1231,7 +1236,7 @@ size_t number2)

    meow:: MergeableHeap<Element> (C++ class)

    -

    Description

    +

    Description

    一個用 左偏樹 實作的 Maximum-Heap , 除了原本heap有的功能外, 還支援 merge, split 等功能

    @@ -1401,7 +1406,7 @@ width:100%;

    meow:: KD_Tree<Vector, Scalar> (C++ class)

    -

    Description

    +

    Description

    KD_Tree 全名k-dimension tree, 用來維護由 N個K維度向量所成的集合, 並可於該set中查找 前i個離給定向量最接近的向量

    @@ -1610,7 +1615,7 @@ bool cmp)

    meow:: SplayTree<Key, Value> (C++ class)

    -

    Description

    +

    Description

    SplayTree 是一種神乎其技的資料結構, 維護一堆 Key→Value . 並且支援 一些 std::map 難以快速實踐的操作, 如 split , merge , keyOffset

    @@ -1954,7 +1959,7 @@ SplayTree* tree2)

    meow:: SegmentTree<Value> (C++ class)

    -

    Description

    +

    Description

    維護一個陣列, 並且讓user可以有區間查詢, 區間修改的小東東

    @@ -2124,6 +2129,7 @@ Value const& delta)

    +
    @@ -2132,7 +2138,7 @@ Value const& delta)


    diff --git a/meowpp/Usage.h b/meowpp/Usage.h index d2ef083..60be936 100644 --- a/meowpp/Usage.h +++ b/meowpp/Usage.h @@ -88,6 +88,7 @@ namespace meow{ Strings usage_end ; Strings proc_arguments; }; + //# //# === meow:: *Usage* (C++ Class) //# ==== Description //# `Usage` 是用來分析argc, argv和輸出usage document的class. @@ -149,6 +150,7 @@ namespace meow{ //#================================== //# //#''' + //# } #include "Usage.hpp" diff --git a/meowpp/dsa/MergeableHeap.h b/meowpp/dsa/MergeableHeap.h index c1a2460..a7215bc 100644 --- a/meowpp/dsa/MergeableHeap.h +++ b/meowpp/dsa/MergeableHeap.h @@ -91,6 +91,7 @@ namespace meow{ //#|============================================== }; + //# //# [WARNING] //#============================================== //# * 假設現在有兩個MergeableHeap `A` 和 `B`, 則: diff --git a/meowpp/dsa/SegmentTree.h b/meowpp/dsa/SegmentTree.h index 89fd5d9..b9e4c64 100644 --- a/meowpp/dsa/SegmentTree.h +++ b/meowpp/dsa/SegmentTree.h @@ -106,6 +106,9 @@ namespace meow{ //#|============================================== }; + //# + //# ''' + //# } #include "SegmentTree.hpp" diff --git a/meowpp/oo/Register_Implement.h b/meowpp/oo/Register_Implement.h index 2e8ca32..a27591d 100644 --- a/meowpp/oo/Register_Implement.h +++ b/meowpp/oo/Register_Implement.h @@ -28,26 +28,26 @@ namespace meow{ virtual ~RegisterInterface(){ } std::vector getIdentifys() const; }; - /******************************************************************* - @asciidoc - === meow:: *ImplementInterface/RegisterInterface* (C++ Class) - .Description - Assume there is a problem which can be solved by different algorithms. - Then you can write multiple classes to approach this problem. + - Now if you want to decide which algorithm to use in runtime, you can just - approach this case by a simple way: - - * Let all the problem-solving classes inherit from - `class ImplementInterface` , and call the constructure with giving - `identify` (type `T` ) . - * Create an class inherit from `RegisterInterface` , and register all your - implement class to it by call `regImplement(pointer to the class)`. - * Select which implement class you want by call `getImplement(identify)` , - which will return the pointer to the corresponding class. - - ''' - @asciidoc- - ******************************************************************/ + //# + //# === meow:: *ImplementInterface/RegisterInterface* (C++ Class) + //# ==== Description + //# Assume there is a problem which can be solved by different algorithms. + //# Then you can write multiple classes to approach this problem. + + //# Now if you want to decide which algorithm to use in runtime, you can just + //# approach this case by a simple way: + //# + //# * Let all the problem-solving classes inherit from + //# `class ImplementInterface` , and call the constructure with giving + //# `identify` (type `T` ) . + //# * Create an class inherit from `RegisterInterface` , + //# and register all your implement class to it by call + //# `regImplement(pointer to the class)`. + //# * Select which implement class you want by call + //# `getImplement(identify)` , which will return the pointer + //# to the corresponding class. + //# + //# ''' + //# } #include "Register_Implement.hpp" diff --git a/meowpp/utility.h b/meowpp/utility.h index ec47225..9e59470 100644 --- a/meowpp/utility.h +++ b/meowpp/utility.h @@ -40,7 +40,9 @@ namespace meow{ template inline double average(T const& beg, T const& end, T const& p, double sigs); + //# //# === meow:: *Functios* in utility.h + //# //# [options="header",width="100%",cols="1>s,5<,1<,10<",grid="rows"] //# |============================================================== //# |Name | Parameters | Return_Type | Description -- cgit v1.2.3