public
Homepage: http://www.melgray.org
Clone URL: git://github.com/melito/dm-is-nested_interval.git
DEV: Minor changes...still nothing here.
melito (author)
Mon Jul 21 14:10:47 -0700 2008
commit  8d13fa148b08af0f5acb215cea7e3b74a65231ba
tree    c2412a38f3729ee181a398d39de19fce73b83441
parent  22d2d6a90eef17a36eeff401fbcb459a4ef745b4
0
...
34
35
36
37
38
39
40
...
53
54
55
 
56
57
 
58
59
 
60
61
 
62
63
64
65
66
 
67
68
69
70
 
 
 
 
 
...
34
35
36
 
37
38
39
...
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
67
68
69
70
71
72
73
74
75
76
77
78
0
@@ -34,7 +34,6 @@ Here is a pretty diagram lifted from the dm-is-nested_set README file.
0
 |_____________________________________________________________________________|
0
 
0
 
0
-
0
 What is a Nested Interval ?
0
 ===========================
0
 
0
@@ -53,18 +52,27 @@ I am NOT a smart person by any means (actually quite dense), but after discussin
0
 
0
 The whole point of writing this plugin is to allow for an easy means of creating and updating records using Nested Intervals.
0
 
0
+
0
 Farey Fractions ?
0
 =================
0
+Look at these maths: http://tinyurl.com/3lvep4
0
 Coming soon.
0
 
0
+
0
 Irrational numbers ?
0
 ====================
0
+
0
 WtF? We need more sanity not less!
0
 I have no time for dealing with anything irrational.
0
-
0
 Coming soon.
0
 
0
+
0
 Using
0
 =====
0
 Coming soon.
0
 
0
+
0
+License
0
+=======
0
+
0
+Well, I haven't done anything yet, but what the hell:
...
8
9
10
 
 
11
12
13
...
40
41
42
 
43
44
45
46
47
 
48
49
50
...
8
9
10
11
12
13
14
15
...
42
43
44
45
46
47
48
49
 
50
51
52
53
0
@@ -8,6 +8,8 @@ module DataMapper
0
         
0
         property :numer, Integer
0
         property :denom, Integer
0
+ property :lft, Integer
0
+ property :rgt, Integer
0
         
0
         # This is where the logic goes for saving a new record
0
         before :save do
0
@@ -40,11 +42,12 @@ module DataMapper
0
           return d
0
         end
0
         
0
+ # Rational number method
0
         def rational(n, d)
0
           self.numer = n / greatest_common_denominator(n, d);
0
           self.denom = d / greatest_common_denominator(n, d);
0
         end
0
-
0
+
0
       end
0
 
0
     end

Comments

    No one has commented yet.