[Ruler-commits] r31 - in pkg/ruleR: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 2 18:34:03 CEST 2012


Author: merysionek
Date: 2012-08-02 18:34:02 +0200 (Thu, 02 Aug 2012)
New Revision: 31

Modified:
   pkg/ruleR/R/ruleR.R
   pkg/ruleR/man/AddConstSingleRule-class.Rd
   pkg/ruleR/man/AddDoubleRule-class.Rd
   pkg/ruleR/man/AddRule.Rd
   pkg/ruleR/man/DigSumSingleRule-class.Rd
   pkg/ruleR/man/DivDoubleRule-class.Rd
   pkg/ruleR/man/DoubleRule-class.Rd
   pkg/ruleR/man/ExpDoubleRule-class.Rd
   pkg/ruleR/man/IdenSingleRule-class.Rd
   pkg/ruleR/man/ModuloDoubleRule-class.Rd
   pkg/ruleR/man/MultConstSingleRule-class.Rd
   pkg/ruleR/man/MultDoubleRule-class.Rd
   pkg/ruleR/man/MyRules.Rd
   pkg/ruleR/man/NegativeSingleRule-class.Rd
   pkg/ruleR/man/SingleRule-class.Rd
   pkg/ruleR/man/SubsConstSingleRule-class.Rd
   pkg/ruleR/man/SubsDoubleRule-class.Rd
   pkg/ruleR/man/VerifTable.Rd
   pkg/ruleR/man/createDR.Rd
   pkg/ruleR/man/createSR.Rd
   pkg/ruleR/man/digits.Rd
   pkg/ruleR/man/doubleRules.Rd
   pkg/ruleR/man/duplicate.Rd
   pkg/ruleR/man/print.DoubleRule.Rd
   pkg/ruleR/man/print.SingleRule.Rd
   pkg/ruleR/man/sequence.Rd
   pkg/ruleR/man/singleRules.Rd
Log:
decription

Modified: pkg/ruleR/R/ruleR.R
===================================================================
--- pkg/ruleR/R/ruleR.R	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/R/ruleR.R	2012-08-02 16:34:02 UTC (rev 31)
@@ -259,7 +259,6 @@
   return(m)                                                     
 }
 
-m<-createSR(a1=2,cv1=2,n=3,3,3,4,4,5,5)
 
 # A FUNCTION TO COMBINE DOUBLE RULES - it generates all parameters automatically 
 

Modified: pkg/ruleR/man/AddConstSingleRule-class.Rd
===================================================================
--- pkg/ruleR/man/AddConstSingleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/AddConstSingleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,8 @@
 
 \title{Class \code{"AddConstSingleRule"}}
 \description{
- A class for rules which add a constant value to the previous element of numeric sequence.
+ A class for rules which add a specyfied constant value to the previous element of numeric sequence.
+ Objects of this class inherit from \code{SingleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("AddConstSingleRule", constantVal)}.
@@ -15,7 +16,7 @@
 \section{Slots}{
   \describe{
     \item{\code{constantVal}:}{Object of class \code{"numeric"} - a constant that will be added to the previous element of numeric sequence }
-    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} -  a rule that will be executed before AddConstSingleRule (this is an argument used to combine different rules together)}
+    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} -  a rule that will be executed before \code{AddConstSingleRule} (this is an argument used to combine different rules together)}
     \item{\code{.S3Class}:}{Object of class \code{"character"} -  S3 methods apply to this object }
   }
 }
@@ -39,38 +40,29 @@
 
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
-\code{\link{calculate}}, \code{\linkS4class{SingleRule}}, \code{\link{print}}
+\code{\link{calculate}}, 
+\code{\linkS4class{SingleRule}},
+\code{\linkS4class{DoubleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 
-\code{\link{calculate}}, a functions to execute the rule
-\code{\linkS4class{SingleRule}}
 }
 \examples{
 ##[1]A rule that adds 4 to the previous element of numeric sequence
 
-m<-new("AddConstSingleRule",constantVal=4) 
-calculate(m,16) #16+4=20
+m<-new("AddConstSingleRule",constantVal=4) #or m<-createSR(a1=2,cv1=4,n=0)
+print(m)
 
 
-
-
 ##[2]combining rules
 
-p<-new("DigSumSingleRule") 
-# a rule that calculates digitsum of a given element
-
+p<-new("DigSumSingleRule") # a rule that calculates digitsum of a given element
 m<-new("AddConstSingleRule",constantVal=5, previousRule=p)
 
-calculate(m,40) #9
+# or in one step  m<-createSR(a1=2,cv1=5,n=1,5,0)
 
-## How is rule 'g' executed ?
-## rule 'p' (previousRule) is executed on element 40 (4+0=4)
-## rule 'm' is executed on the result of previousRule (4+5=9)
+print(m)
 
-## You can combine many different rules i.e. rule 'm' can be a 
-## previousRule argument of another rule etc.
-
-
-
 }
 \keyword{classes}
 \keyword{AddConstSingleRule}

Modified: pkg/ruleR/man/AddDoubleRule-class.Rd
===================================================================
--- pkg/ruleR/man/AddDoubleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/AddDoubleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -7,6 +7,7 @@
 \title{Class \code{"AddDoubleRule"}}
 \description{
  A class for rule which adds two prevous elements of numeric sequence.
+ It inherits from class \code{DoubleRule}
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("AddDoubleRule",... )}.
@@ -43,7 +44,9 @@
 \seealso{
 \code{\link{calculate}}, 
 \code{\linkS4class{DoubleRule}},
-\code{\linkS4class{SingleRule}}
+\code{\linkS4class{SingleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 
 
 

Modified: pkg/ruleR/man/AddRule.Rd
===================================================================
--- pkg/ruleR/man/AddRule.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/AddRule.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -45,7 +45,8 @@
 \seealso{
 \code{\link{automaticTest}},
 \code{\link{MyRules}},
-\code{\link{automaticTest}}
+\code{\link{createSR}},
+\code{\link{createDR}}
 
 }
 \examples{

Modified: pkg/ruleR/man/DigSumSingleRule-class.Rd
===================================================================
--- pkg/ruleR/man/DigSumSingleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/DigSumSingleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,15 +6,16 @@
 
 \title{Class \code{"DigSumSingleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules calculating a sum of digits of a single element of numeric sequence.
+It inherits from class \code{SingleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("DigSumSingleRule", ...)}.
-%%  ~~ describe objects here ~~ 
+
 }
 \section{Slots}{
   \describe{
-    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} ~~ }
+    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} rule to be executed on an element of numeric sequence before \code{DigSumSingleRule}, by default is \code{NULL}}}.
     \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
   }
 }
@@ -39,10 +40,28 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}},
+\code{\link{createSR}},
+\code{\link{createDR}},
+\code{\linkS4class{SingleRule}}
 }
 \examples{
-showClass("DigSumSingleRule")
+
+##[1] simple single rule
+b<-new("DigSumSingleRule")
+print(b)
+
+b<-createSR(a1=5,n=0) #See 'createSR' for details
+print(b)
+
+##[2] combining single rules
+b<-new("DigSumSingleRule",previousRule=new("DigSumSingleRule"))#or b<-createSR(a1=5,cv1=0,n=1,5,0)
+print(b)
+
+#name: DigSumSingleRule
+#name: DigSumSingleRule
+
+calculate(b,785) #2 because 7+8+5=20; 2+0=2
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/DivDoubleRule-class.Rd
===================================================================
--- pkg/ruleR/man/DivDoubleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/DivDoubleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,8 @@
 
 \title{Class \code{"DivDoubleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules deviding first element of numeric sequence by the second one. 
+It inherits from class \code{DoubleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("DivDoubleRule", ...)}.
@@ -14,10 +15,10 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} - \code{SingleRule} to be executed on the first element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied. }
+    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} -  \code{SingleRule} to be executed on the second element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied. }
+    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} -  \code{SingleRule} to be executed on the result of \code{DoubleRule}. This doesn't need to be specyfied.}
+    \item{\code{.S3Class}:}{Object of class \code{"character"} -  S3 methods apply for these objects }
   }
 }
 \section{Extends}{
@@ -41,10 +42,18 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}},
+\code{\linkS4class{DoubleRule}},
+\code{\linkS4class{SingleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 }
 \examples{
-showClass("DivDoubleRule")
+
+m<-new("DivDoubleRule") 
+print(m)
+
+calculate(m,20,10) #20/10=2
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/DoubleRule-class.Rd
===================================================================
--- pkg/ruleR/man/DoubleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/DoubleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,18 +6,20 @@
 
 \title{Class \code{"DoubleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules operating on two elements of numeric sequence.
+It is a virtual class - so no objects of this class are generated. 
+All classes for specyfic rules operating on two arguiments (ex. \code{AddDoubleRule},\code{DivDoubleRule} etc.)
+inherit from class \code{DoubleRule}.
 }
 \section{Objects from the Class}{
-Objects can be created by calls of the form \code{new("DoubleRule", ...)}.
 %%  ~~ describe objects here ~~ 
 }
 \section{Slots}{
   \describe{
-    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{firstRule}:}{ Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the first element of numeric sequence (before the \code{DoubleRule}).This doesn't need to be specyfied. }
+    \item{\code{secondRule}:}{ Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the second element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied. }
+    \item{\code{nextSingle}:}{ Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the result of \code{DoubleRule}.This doesn't need to be specyfied.}
+    \item{\code{.S3Class}:}{Object of class \code{"character"} Object of class \code{"character"} S3 methods apply for these objects }
   }
 }
 \section{Methods}{
@@ -38,10 +40,18 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{doubleRules}},
+\code{\linkS4class{AddDoubleRule}},
+\code{\linkS4class{MultDoubleRule}},
+\code{\linkS4class{SubsDoubleRule}},
+\code{\linkS4class{DivDoubleRule}},
+\code{\linkS4class{ModuloDoubleRule}},
+\code{\linkS4class{ExpDoubleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
+
 }
 \examples{
-showClass("DoubleRule")
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/ExpDoubleRule-class.Rd
===================================================================
--- pkg/ruleR/man/ExpDoubleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/ExpDoubleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,18 +6,20 @@
 
 \title{Class \code{"ExpDoubleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules calculating an exponential function using two elements of numeric sequence
+(treating the second element as an exponent and first element as a base). 
+Objects of this class inherit from class \code{DoubleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("ExpDoubleRule", ...)}.
-%%  ~~ describe objects here ~~ 
+
 }
 \section{Slots}{
   \describe{
-    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the first element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied. }
+    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the second element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied. }
+    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the result of \code{DoubleRule}. This doesn't need to be specyfied.}
+    \item{\code{.S3Class}:}{Object of class \code{"character"} S3 methods apply for these objects }
   }
 }
 \section{Extends}{
@@ -41,10 +43,18 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}},
+\code{\linkS4class{DoubleRule}},
+\code{\linkS4class{SingleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 }
 \examples{
-showClass("ExpDoubleRule")
+
+m<-new("ExpDoubleRule")
+print(m)
+
+calculate(m,2,4) #2^4=16
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/IdenSingleRule-class.Rd
===================================================================
--- pkg/ruleR/man/IdenSingleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/IdenSingleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,9 @@
 
 \title{Class \code{"IdenSingleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules which return not modyfied input.
+Used mainly in \code{automaticTest} to define no futher operations.
+Objects of this class inherit from \code{SingleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("IdenSingleRule", ...)}.
@@ -14,8 +16,8 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{previousRule}:}{Object of class \code{"SingleRule"}  -  a rule that will be executed before \code{IdenSingleRule} (this is an argument used to combine different rules together)}
+    \item{\code{.S3Class}:}{Object of class \code{"character"} -  S3 methods apply to this object }
   }
 }
 \section{Extends}{
@@ -39,10 +41,15 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}},
+\code{\link{automaticTest}}, 
+\code{\linkS4class{SingleRule}},
+\code{\linkS4class{DoubleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 }
 \examples{
-showClass("IdenSingleRule")
+m<-new("IdenSingleRule")
+print(m)
 }
 \keyword{classes}

Modified: pkg/ruleR/man/ModuloDoubleRule-class.Rd
===================================================================
--- pkg/ruleR/man/ModuloDoubleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/ModuloDoubleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,8 @@
 
 \title{Class \code{"ModuloDoubleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules calculating modulo from two elements of numeric sequence. 
+Objects of this class inherit from class \code{DoubleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("ModuloDoubleRule", ...)}.
@@ -14,10 +15,10 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the first element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied.}
+    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the second element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied. }
+    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the result of \code{DoubleRule}. This doesn't need to be specyfied. }
+    \item{\code{.S3Class}:}{Object of class \code{"character"} S3 methods apply for these objects }
   }
 }
 \section{Extends}{
@@ -41,10 +42,17 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}},
+\code{\linkS4class{DoubleRule}},
+\code{\linkS4class{SingleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 }
 \examples{
-showClass("ModuloDoubleRule")
+m<-new("ModuloDoubleRule") 
+print(m)
+
+calculate(m,20,15) #mod(20,15)=5
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/MultConstSingleRule-class.Rd
===================================================================
--- pkg/ruleR/man/MultConstSingleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/MultConstSingleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,8 @@
 
 \title{Class \code{"MultConstSingleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules which multiply previous element of numeric sequence by a specyfied constant.
+ Objects of this class inherit from \code{SingleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("MultConstSingleRule", ...)}.
@@ -14,9 +15,9 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{constantVal}:}{Object of class \code{"numeric"} ~~ }
-    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{constantVal}:}{Object of class \code{"numeric"} - a constant that will be added to the previous element of numeric sequence }
+    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} -  a rule that will be executed before \code{MultConstSingleRule} (this is an argument used to combine different rules together) }
+    \item{\code{.S3Class}:}{Object of class \code{"character"} -  S3 methods apply to this object }
   }
 }
 \section{Extends}{
@@ -40,10 +41,17 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}}, 
+\code{\linkS4class{SingleRule}},
+\code{\linkS4class{DoubleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 }
 \examples{
-showClass("MultConstSingleRule")
+m<-new("MultConstSingleRule",constantVal=4) #or m<-createSR(a1=3,cv1=4,n=0)
+print(m)
+
+calculate(m,50)#50*4=200
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/MultDoubleRule-class.Rd
===================================================================
--- pkg/ruleR/man/MultDoubleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/MultDoubleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,8 @@
 
 \title{Class \code{"MultDoubleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules multiplying two elements of numeric sequence. 
+Objects of this class inherit from class \code{DoubleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("MultDoubleRule", ...)}.
@@ -14,10 +15,10 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} - \code{SingleRule} to be executed on the first element of numeric sequence (before the \code{DoubleRule}).This doesn't need to be specyfied.}
+    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} -  \code{SingleRule} to be executed on the second element of numeric sequence (before the \code{DoubleRule}).This doesn't need to be specyfied. }
+    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} -  \code{SingleRule} to be executed on the result of \code{DoubleRule}. This doesn't need to be specyfied.}
+    \item{\code{.S3Class}:}{Object of class \code{"character"} -  S3 methods apply for these objects }
   }
 }
 \section{Extends}{
@@ -41,10 +42,18 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}},
+\code{\linkS4class{DoubleRule}},
+\code{\linkS4class{SingleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 }
 \examples{
-showClass("MultDoubleRule")
+
+m<-new("MultDoubleRule") 
+print(m)
+
+calculate(m,20,9) #20*9=180
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/MyRules.Rd
===================================================================
--- pkg/ruleR/man/MyRules.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/MyRules.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -5,13 +5,12 @@
 %%   ~~ data name/kind ... ~~
 }
 \description{
-%%  ~~ A concise (1-5 lines) description of the dataset. ~~
+A list on which combined rules defined by user are stored. By default this list contains one \code{NA} value.
+Rules can be added to this list by function \code{AddRule}.
 }
 \usage{data(MyRules)}
 \format{
-  The format is:
-List of 1
- $ : logi NA
+
 }
 \details{
 %%  ~~ If necessary, more details than the __description__ above ~~
@@ -22,8 +21,28 @@
 \references{
 %%  ~~ possibly secondary sources and usages ~~
 }
+
+\seealso{
+\code{\link{AddRule}},
+\code{\link{automaticTest}},
+\code{\link{createSR}},
+\code{\link{createDR}}
+}
+
+
 \examples{
-data(MyRules)
-## maybe str(MyRules) ; plot(MyRules) ...
+MyRules
+
+m<-createSR()
+print(m)
+AddRule(m)#"Your rule succesfully added tp 'MyRule' list"
+
+MyRules
+AddRule(m) #Error in AddRule(m) : There already is a rule that gives the same result.
+
+k<-createDR()
+print(k)
+AddRule(k)#"Your rule succesfully added tp 'MyRule' list"
+
 }
 \keyword{datasets}

Modified: pkg/ruleR/man/NegativeSingleRule-class.Rd
===================================================================
--- pkg/ruleR/man/NegativeSingleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/NegativeSingleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,8 @@
 
 \title{Class \code{"NegativeSingleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules which create a negative value from single element of numeric sequence.
+ Objects of this class inherit from \code{SingleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("NegativeSingleRule", ...)}.
@@ -14,8 +15,8 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} -  a rule that will be executed before \code{NegativeSingleRule} (this is an argument used to combine different rules together)}
+    \item{\code{.S3Class}:}{Object of class \code{"character"} -  S3 methods apply to this object }
   }
 }
 \section{Extends}{
@@ -39,10 +40,18 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}}, 
+\code{\link{createSR}},
+\code{\link{createDR}},
+\code{\linkS4class{SingleRule}},
+\code{\linkS4class{DoubleRule}}
+
 }
 \examples{
-showClass("NegativeSingleRule")
+m<-new("NegativeSingleRule") #or m<-createSR(a1=6,n=0)
+print(m)
+
+calculate(m,4)#-4
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/SingleRule-class.Rd
===================================================================
--- pkg/ruleR/man/SingleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/SingleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -7,7 +7,10 @@
 
 \title{Class \code{"SingleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules operating on one element of numeric sequence.
+It is a virtual class - so no objects of this class are generated. 
+All classes for specyfic rules operating on one arguiment (ex. \code{AddConstRule}, \code{MultConstSingleRule} etc.)
+inherit from class \code{SingleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("SingleRule", ...)}.
@@ -15,8 +18,8 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} -  a rule that will be executed before the main SingleRule }
+    \item{\code{.S3Class}:}{Object of class \code{"character"} -  S3 methods apply to this object }
   }
 }
 \section{Methods}{
@@ -38,10 +41,18 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{singleRules}},
+\code{\linkS4class{IdenSingleRule}},
+\code{\linkS4class{AddConstSingleRule}},
+\code{\linkS4class{MultConstSingleRule}},
+\code{\linkS4class{SubsConstSingleRule}},
+\code{\linkS4class{DigSumSingleRule}},
+\code{\linkS4class{NegativeSingleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}},
+\code{\linkS4class{DoubleRule}}
 }
 \examples{
-showClass("SingleRule")
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/SubsConstSingleRule-class.Rd
===================================================================
--- pkg/ruleR/man/SubsConstSingleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/SubsConstSingleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,8 @@
 
 \title{Class \code{"SubsConstSingleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+ A class for rules which substracts a specyfied constant value from the previous element of numeric sequence.
+ Objects of this class inherit from \code{SingleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("SubsConstSingleRule", ...)}.
@@ -14,9 +15,9 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{constantVal}:}{Object of class \code{"numeric"} ~~ }
-    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{constantVal}:}{Object of class \code{"numeric"} - a constant that will be added to the previous element of numeric sequence }
+    \item{\code{previousRule}:}{Object of class \code{"SingleRule"} -  a rule that will be executed before \code{SubsConstSingleRule} (this is an argument used to combine different rules together) }
+    \item{\code{.S3Class}:}{Object of class \code{"character"} -  S3 methods apply to this object }
   }
 }
 \section{Extends}{
@@ -34,16 +35,22 @@
 %%  ~~who you are~~
 }
 \note{
-%%  ~~further notes~~
+
+
 }
 
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}}, 
+\code{\linkS4class{SingleRule}},
+\code{\linkS4class{DoubleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 }
 \examples{
-showClass("SubsConstSingleRule")
+m<-new("SubsConstSingleRule",constantVal=41) #or m<-createSR(a1=4,cv1=41,n=0)
+print(m)
+calculate(m,34)#34-41=-7
 }
 \keyword{classes}

Modified: pkg/ruleR/man/SubsDoubleRule-class.Rd
===================================================================
--- pkg/ruleR/man/SubsDoubleRule-class.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/SubsDoubleRule-class.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -6,7 +6,8 @@
 
 \title{Class \code{"SubsDoubleRule"}}
 \description{
-%%  ~~ A concise (1-5 lines) description of what the class is. ~~
+A class for rules substracting the second element of numeric sequence from the first one. 
+Objects of this class inherit from class \code{DoubleRule}.
 }
 \section{Objects from the Class}{
 Objects can be created by calls of the form \code{new("SubsDoubleRule", ...)}.
@@ -14,10 +15,10 @@
 }
 \section{Slots}{
   \describe{
-    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"} ~~ }
-    \item{\code{.S3Class}:}{Object of class \code{"character"} ~~ }
+    \item{\code{firstRule}:}{Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the first element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied.}
+    \item{\code{secondRule}:}{Object of class \code{"SingleRule"} \code{SingleRule} to be executed on the second element of numeric sequence (before the \code{DoubleRule}). This doesn't need to be specyfied. }
+    \item{\code{nextSingle}:}{Object of class \code{"SingleRule"}  \code{SingleRule} to be executed on the result of \code{DoubleRule}. This doesn't need to be specyfied. }
+    \item{\code{.S3Class}:}{Object of class \code{"character"} S3 methods apply for these objects}
   }
 }
 \section{Extends}{
@@ -41,10 +42,18 @@
 %% ~Make other sections like Warning with \section{Warning }{....} ~
 
 \seealso{
-%%  ~~objects to See Also as \code{\link{~~fun~~}}, ~~~
-%%  ~~or \code{\linkS4class{CLASSNAME}} for links to other classes ~~~
+\code{\link{calculate}},
+\code{\linkS4class{DoubleRule}},
+\code{\linkS4class{SingleRule}},
+\code{\link{createSR}},
+\code{\link{createDR}}
 }
 \examples{
-showClass("SubsDoubleRule")
+
+m<-new("SubsDoubleRule") 
+print(m)
+
+calculate(m,20,7) # 20-7=13
+
 }
 \keyword{classes}

Modified: pkg/ruleR/man/VerifTable.Rd
===================================================================
--- pkg/ruleR/man/VerifTable.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/VerifTable.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -5,12 +5,16 @@
 %%   ~~ data name/kind ... ~~
 }
 \description{
-%%  ~~ A concise (1-5 lines) description of the dataset. ~~
+A table in which numeric sequences generated for arguments \code{x1=10},
+\code{x2=20}, \code{constantVal=14}, \code{seqlen=6} are stored.
+This table is used by \code{AddRule} functions to check the uniqueness of
+rules specyfied by user. By default this table contains a single vector \code{NA}
+of length 6.
+
 }
 \usage{data(VerifTable)}
 \format{
-  The format is:
- logi [1, 1:6] NA NA NA NA NA NA
+  
 }
 \details{
 %%  ~~ If necessary, more details than the __description__ above ~~
@@ -21,8 +25,45 @@
 \references{
 %%  ~~ possibly secondary sources and usages ~~
 }
+\seealso{
+\code{\link{AddRule}},
+\code{\link{automaticTest}},
+\code{\link{MyRules}}
+
+}
+
 \examples{
-data(VerifTable)
-## maybe str(VerifTable) ; plot(VerifTable) ...
+
+VerifTable
+#      [,1] [,2] [,3] [,4] [,5] [,6]
+#[1,]   NA   NA   NA   NA   NA   NA
+
+
+MyRules<-list(NA)
+# [[1]]
+# [1] NA
+
+
+AddRule(new("AddConstSingleRule", constantVal=7)) #"Your rule succesfully added tp 'MyRule' list"
+
+
+VerifTable
+#      [,1] [,2] [,3] [,4] [,5] [,6]
+#[1,]   10   17   24   31   38   45
+#[2,]   NA   NA   NA   NA   NA   NA
+
+
+MyRules
+#[[1]]
+# [1] NA
+#
+#[[2]]
+#
+#name: AddConstSingleRule, constant value:  7
+
+
+AddRule(new("AddConstSingleRule", constantVal=7))
+#Error in AddRule(new("AddConstSingleRule", constantVal = 7)) :There already is a rule that gives the same result.
+
 }
 \keyword{datasets}

Modified: pkg/ruleR/man/createDR.Rd
===================================================================
--- pkg/ruleR/man/createDR.Rd	2012-08-01 21:20:10 UTC (rev 30)
+++ pkg/ruleR/man/createDR.Rd	2012-08-02 16:34:02 UTC (rev 31)
@@ -16,13 +16,13 @@
 an index of \code{DoubleRule} stored on  \code{doubleRules} list to be used while creating new object. If not specyfied it will be generated automatically. 
 }
   \item{fr}{
-(first rule) an object of class \code{SingleRule}. This rule will be applied to the first element of numeric sequence. If not specyfied it will be generated automatically. \code{fr=1} means that no additional rule is to be executed on the first argument of numeric sequence.
+(first rule) an object of class \code{SingleRule}. This rule will be applied to the first element of numeric sequence. If not specyfied it will be generated automatically. To specify no \code{firstRule} argument in object of class \code{DoubleRule}, \code{fr} must be defined as identical function \code{IdenSingleRule} (\code{fr=createSR("IdenSingleRule",n=0)}). For details see example [3].
 }
   \item{sr}{
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/ruler -r 31


More information about the Ruler-commits mailing list