Module: Freql::FQ
- Defined in:
- lib/freql/fq.rb
Class Method Summary collapse
- .calc_fq(occurances, total) ⇒ Object
- .fq_to_cb(fq) ⇒ Object
- .fq_to_fpbw(fq) ⇒ Object
- .fq_to_fpmw(fq) ⇒ Object
- .fq_to_zipf(fq) ⇒ Object
Class Method Details
.calc_fq(occurances, total) ⇒ Object
23 24 25 |
# File 'lib/freql/fq.rb', line 23 def calc_fq occurances, total occurances / total.to_f end |
.fq_to_cb(fq) ⇒ Object
19 20 21 |
# File 'lib/freql/fq.rb', line 19 def fq_to_cb fq Math.log10(fq) * 100.0 end |
.fq_to_fpbw(fq) ⇒ Object
13 14 15 |
# File 'lib/freql/fq.rb', line 13 def fq_to_fpbw fq fq * 1000000000 end |
.fq_to_fpmw(fq) ⇒ Object
10 11 12 |
# File 'lib/freql/fq.rb', line 10 def fq_to_fpmw fq fq * 1000000 end |
.fq_to_zipf(fq) ⇒ Object
16 17 18 |
# File 'lib/freql/fq.rb', line 16 def fq_to_zipf fq Math.log10(fq)+9 end |