00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <Basics.H>
00026 #include <FP.H>
00027 #include "PKPrefix.H"
00028
00029 using std::cout;
00030 using std::endl;
00031
00032 static const int PKBits = 8 * sizeof(Word);
00033 static const int BitsPerArc = 4;
00034 static const int LoArcSz = 3;
00035 static const int HiArcSz = 5;
00036
00037 int main()
00038 {
00039 FP::Tag fp("Here is a random fingerprint");
00040 cout << "Original FP:" << endl;
00041 cout << " " << fp << endl;
00042
00043 for (int arcSz = LoArcSz; arcSz <= HiArcSz; arcSz++) {
00044 cout << "\nPrefixes (arc size = " << arcSz << " characters):\n";
00045 int arcBits = arcSz * BitsPerArc;
00046 for (int i = PKBits - arcBits; i > -arcBits; i -= arcBits) {
00047 i = max(i, 0);
00048 PKPrefix::T pfx(fp, i);
00049 cout << " " << pfx << " -> ";
00050 cout << "\"" << pfx.Pathname(i, arcBits) << "\"" << endl;
00051 }
00052 }
00053 return 0;
00054 }