brute-fuzzy 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.rdoc +2 -0
- data/Manifest.txt +10 -0
- data/README.rdoc +26 -0
- data/Rakefile +21 -0
- data/bin/brute-fuzzy-perftest +14 -0
- data/lib/brute-fuzzy.rb +11 -0
- data/lib/brute-fuzzy/base.rb +4 -0
- data/lib/brute-fuzzy/brute-fuzzy-1.0.0.jar +0 -0
- data/pom.xml +15 -0
- data/test/test_fuzzy_set.rb +27 -0
- metadata +102 -0
data/History.rdoc
ADDED
data/Manifest.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
= brute-fuzzy
|
2
|
+
|
3
|
+
== Description
|
4
|
+
|
5
|
+
Fuzzy bit match 64-bit integer key set in java with performance test.
|
6
|
+
|
7
|
+
== Dependencies
|
8
|
+
|
9
|
+
* Java 1.5+
|
10
|
+
* JRuby 1.1.6+
|
11
|
+
|
12
|
+
== License
|
13
|
+
|
14
|
+
Copyright (c) 2010 David Kellum
|
15
|
+
|
16
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you
|
17
|
+
may not use this file except in compliance with the License. You
|
18
|
+
may obtain a copy of the License at:
|
19
|
+
|
20
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
21
|
+
|
22
|
+
Unless required by applicable law or agreed to in writing, software
|
23
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
24
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
25
|
+
implied. See the License for the specific language governing
|
26
|
+
permissions and limitations under the License.
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
$LOAD_PATH << './lib'
|
4
|
+
require 'brute-fuzzy/base'
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
gem 'rjack-tarpit', '~> 1.1'
|
8
|
+
require 'rjack-tarpit'
|
9
|
+
|
10
|
+
t = RJack::TarPit.new( 'brute-fuzzy',
|
11
|
+
BruteFuzzy::VERSION,
|
12
|
+
:no_assembly )
|
13
|
+
|
14
|
+
t.specify do |h|
|
15
|
+
h.developer( "David Kellum", "dek-oss@gravitext.com" )
|
16
|
+
h.extra_deps += [ [ 'gravitext-util', '>= 1.3.2' ] ]
|
17
|
+
end
|
18
|
+
|
19
|
+
file 'Manifest.txt' => [ 'lib/brute-fuzzy.rb' ]
|
20
|
+
|
21
|
+
t.define_tasks
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
# -*- ruby -*-
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'brute-fuzzy'
|
8
|
+
|
9
|
+
require 'gravitext-util'
|
10
|
+
require 'gravitext-util/perftest'
|
11
|
+
|
12
|
+
test = BruteFuzzy::FuzzySetPerfTest.new
|
13
|
+
harness = Gravitext::PerfTest::Harness.new( [ test ] )
|
14
|
+
harness.execute
|
data/lib/brute-fuzzy.rb
ADDED
Binary file
|
data/pom.xml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
2
|
+
<modelVersion>4.0.0</modelVersion>
|
3
|
+
<groupId>com.gravitext</groupId>
|
4
|
+
<artifactId>brute-fuzzy</artifactId>
|
5
|
+
<packaging>jar</packaging>
|
6
|
+
<version>1.0.0</version>
|
7
|
+
<name>Brute Fuzziness</name>
|
8
|
+
<dependencies>
|
9
|
+
<dependency>
|
10
|
+
<groupId>com.gravitext</groupId>
|
11
|
+
<artifactId>gravitext-util</artifactId>
|
12
|
+
<version>1.3.2</version>
|
13
|
+
</dependency>
|
14
|
+
</dependencies>
|
15
|
+
</project>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
#.hashdot.profile += jruby-shortlived
|
3
|
+
|
4
|
+
require 'brute-fuzzy'
|
5
|
+
require 'test/unit'
|
6
|
+
|
7
|
+
class TestFuzzySet < Test::Unit::TestCase
|
8
|
+
def setup
|
9
|
+
@fset = BruteFuzzy::FuzzySet64.new( 100, 4 )
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_fuzzy_match
|
13
|
+
assert( @fset.fuzzy_match( 0, 0 ) )
|
14
|
+
|
15
|
+
assert( @fset.fuzzy_match( 0x7FFF_FFFF_FFFF_FFFF,
|
16
|
+
0x7FFF_FFFF_7777_FFFF ) )
|
17
|
+
assert( ! @fset.fuzzy_match( 0x7FFF_FFFF_FFFF_FFFF,
|
18
|
+
0x7FFF_FFFF_EFFF_7777 ) )
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_add
|
22
|
+
assert( @fset.add( 0x0 ) )
|
23
|
+
assert( @fset.add( 0xFF ) )
|
24
|
+
assert( ! @fset.add( 0xFE ) )
|
25
|
+
assert( ! @fset.add( 0x1 ) )
|
26
|
+
end
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: brute-fuzzy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
version: 1.0.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- David Kellum
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-08-21 00:00:00 -07:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: gravitext-util
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 3
|
30
|
+
- 2
|
31
|
+
version: 1.3.2
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: rjack-tarpit
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 2
|
44
|
+
- 2
|
45
|
+
version: 1.2.2
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id002
|
48
|
+
description: Fuzzy bit match 64-bit integer key set in java with performance test.
|
49
|
+
email:
|
50
|
+
- dek-oss@gravitext.com
|
51
|
+
executables:
|
52
|
+
- brute-fuzzy-perftest
|
53
|
+
extensions: []
|
54
|
+
|
55
|
+
extra_rdoc_files:
|
56
|
+
- Manifest.txt
|
57
|
+
- History.rdoc
|
58
|
+
- README.rdoc
|
59
|
+
files:
|
60
|
+
- Manifest.txt
|
61
|
+
- README.rdoc
|
62
|
+
- History.rdoc
|
63
|
+
- Rakefile
|
64
|
+
- pom.xml
|
65
|
+
- bin/brute-fuzzy-perftest
|
66
|
+
- lib/brute-fuzzy.rb
|
67
|
+
- lib/brute-fuzzy/base.rb
|
68
|
+
- test/test_fuzzy_set.rb
|
69
|
+
- lib/brute-fuzzy/brute-fuzzy-1.0.0.jar
|
70
|
+
has_rdoc: true
|
71
|
+
homepage:
|
72
|
+
licenses: []
|
73
|
+
|
74
|
+
post_install_message:
|
75
|
+
rdoc_options:
|
76
|
+
- --main
|
77
|
+
- README.rdoc
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
segments:
|
85
|
+
- 0
|
86
|
+
version: "0"
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
version: "0"
|
94
|
+
requirements: []
|
95
|
+
|
96
|
+
rubyforge_project: brute-fuzzy
|
97
|
+
rubygems_version: 1.3.6
|
98
|
+
signing_key:
|
99
|
+
specification_version: 3
|
100
|
+
summary: Fuzzy bit match 64-bit integer key set in java with performance test.
|
101
|
+
test_files:
|
102
|
+
- test/test_fuzzy_set.rb
|