Eagles training camp third operation

first part

1 Install VMware

2 Ubuntu Download Mirror

3 installed VMware in Ubuntu (The following is an article to help address)

https://zhuanlan.zhihu.com/p/38797088

4 on ubuntu system to compile and run the program helloworld

4.1 Open the console: Use the shortcut keys Ctrl + Alt + T;

4.2 Installation vim: input sudo apt-get install vim;

4.3 install gcc: Enter sudo apt-get install g ++.

4.4 write hello.c source code

4.5 compile hello.c implementation of g ++ hello.c -o hello compiled terminal.

4.6 to run the program hello!

the second part

1 sketch

It is a sketch based on a hash (Hash:. A message of arbitrary length is compressed to a function of a fixed length message digest) of the data structure can be characterized in real time traffic information stored in a high-speed network environment, only occupies smaller space resources, and have the balance and memory characteristics estimation accuracy theoretically provable.

By setting the data key a hash function having the same hash value is stored in the same bucket, to reduce the space overhead. Data value as a measurement result of the barrel, is approximately true value. The use of open two-dimensional address space, multiple hash hashing techniques to reduce conflict, improve the accuracy of measurement results.

(I understand: Similar to classify the data, when you're looking for a certain element, and then just kind of looking in, without having to traverse all the data in order to reduce the memory space)

2 Count-Min Sketch

Count-Min Sketch algorithmic process:

D selected a hash function, dxm open a two-dimensional array of integers as a hash table

For each element, the corresponding hash values ​​are calculated using a hash function d, and m is I, then the corresponding increase in the 1 position, each integer referred to as a two-dimensional array sketch

To query frequency of an element, simply remove the d a sketch, that a minimum return (in fact, a sketch d are approximate frequency of the element, any one can return, the algorithm selects the smallest

Count-Min Sketch advantage of the algorithm is the province of memory, the disadvantage is relatively small for the number of occurrences of the elements, poor accuracy, as compared to the original two-dimensional array data is still too small, hash conflict is more serious, leading to bias the results compare Big.

the third part

Looking countminsketch application code on GitHub 1

https://github.com/barrust/count-min-sketch

2 it will be after the code has been cloned into a display Ubuntu

include "count_min_sketch.h" does not exist

3 is the beginning of trying to install Ubuntu in the library of vim, the results of online search is all about the interpretation of this algorithm. After trying the online already written #include "count_min_sketch.h" library file into the library source, the result was not. Skull a little sore.

Guess you like

Origin www.cnblogs.com/yueyanyuan/p/11924430.html