Intro/: Directory containing introductory examples.
HelloWorld.c A simple program that draws a box and writes "Hello World" in
HelloWorld.f it.
data The data file for the introductory progressive example.
Lines.c Reads the data from file "data" and plots just the curve with
Lines.f no labels, viewport or anything indicating quantity or units.
Viewport.c Restricts the graph to a viewport and frames the viewport,
Viewport.f leaving the remainder of the area for labels, etc.
CharLbls.c Adds labels for the chart title, X-axis title, and Y-axis
CharLbls.f title.
Tics.c Adds tic marks to the viewport edges, but since clipping was
Tics.f not set correctly, tics extend outside the viewport.
Clip.c Sets clipping such that tic marks are clipped at the viewport
Clip.f boundaries.
TicLabels.c Adds numeric tic labels to the graph this is the final
TicLabels.f installment of the progressive example.
多項式曲線擬合 任意介數 Purpose - Least-squares curve fit of arbitrary order
working in C++ Builder 2007 as a template class,
using vector<FloatType> parameters.
Added a method to handle some EMathError exceptions.
If do NOT want to use this just call PolyFit2 directly.
usage: Call PolyFit by something like this.
CPolyFit<double> PolyFitObj
double correlation_coefficiant = PolyFitObj.PolyFit(X, Y, A)
where X and Y are vectors of doubles which must have the same size and
A is a vector of doubles which must be the same size as the number of
coefficients required.
returns: The correlation coefficient or -1 on failure.
produces: A vector (A) which holds the coefficients.
實現最優二叉樹的構造;在此基礎上完成哈夫曼編碼器與譯碼器。 假設報文中只會出現如下表所示的字符:
字符 A B C D E F G H I J K L M N
頻度 186 64 13 22 32 103 21 15 47 57 1 5 32 20 57
字符 O P Q R S T U V W X Y Z , .
頻度 63 15 1 48 51 80 23 8 18 1 16 1 6 2
要求完成的系統應具備如下的功能:
1.初始化。從終端(文件)讀入字符集的數據信息,。建立哈夫曼樹。
2.編碼:利用已建好的哈夫曼樹對明文文件進行編碼,并存入目標文件(哈夫曼碼文件)。
3.譯碼:利用已建好的哈夫曼樹對目標文件(哈夫曼碼文件)進行編碼,并存入指定的明文文件。
4.輸出哈夫曼編碼文件:輸出每一個字符的哈夫曼編碼。