Displaying 17 results from an estimated 17 matches for "classb".
Did you mean:
class
2011 Aug 26
1
R.oo data members / inheritance
...))A=15;
if(missing(x))x=NA;
extend(Object(), "ClassA",
.size = A,
.x=x
)
})
setMethodS3("getSize", "ClassA", function(this,...) {
this$.size;
})
setMethodS3("getX", "ClassA", function(this,...) {
this$.x;
})
setConstructorS3("ClassB", function(A,x,bData) {
if(missing(bData))bData = NA;
extend(ClassA(), "ClassB",
.bData = bData
)
})
setMethodS3("getBData", "ClassB", function(this,...) {
this$.bData;
})
Usage:
> b = ClassB(13,100,6)
> b$getSize() # I expected to get...
2008 Nov 05
1
Methods dispatch and inheritance R.oo
...uot;ClassA", function(A=15) {
extend(Object(), "ClassA",
.size = A
);
})
setMethodS3("print", "ClassA", function(this,...) {
print(paste('Class A:',this$.size));
})
objA<-ClassA();
objA
[1] "Class A: 15"
setConstructorS3("ClassB", function(B=15) {
extend("ClassA", "ClassB",
.size2 = B
);
})
setMethodS3("print", "ClassB", function(this,...) {
print(paste('Class B:',this$.size2));
})
objB<-ClassB();
objB
Error in this$.size2 : $ operator is invalid for a...
2009 Jul 07
2
[LLVMdev] How to add an include file
Hi Eli,
Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp
to product a library libClassA.a.
ClassA.h contains the single declaration.
class A {...};
I want to transform it to:
#include "ClassB.h"
class A : public class B {...};
ClassB.h is the header file for a library libClassB.a built from ClassB.cpp
and ClassB.h.
I can clearly link libClassB with libClassA. But how can I bring in the
header file so that it's declarations will be known in ClassA.h. Remember
this is happenin...
2009 Jul 07
0
[LLVMdev] How to add an include file
...dahvid.minor at gmail.com> wrote:
> Hi Eli,
> Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp
> to product a library libClassA.a.
> ClassA.h contains the single declaration.
>
> class A {...};
>
> I want to transform it to:
>
> #include "ClassB.h"
>
> class A : public class B {...};
>
> ClassB.h is the header file for a library libClassB.a built from ClassB.cpp
> and ClassB.h.
> I can clearly link libClassB with libClassA. But how can I bring in the
> header file so that it's declarations will be known in Cla...
2002 May 21
4
setClass() and packages
Where should the setClass() ('methods' package) calls be placed in a
package? I try to follow a one-class-one-file principe, but since
setClass("ClassA", "ClassB") has to come a after setClass("ClassB", [snip])
it is not possible to fully follow this rule. So the best I can do now is to
put all setClass() calls in a file named "000.R" (I know this file is *not*
guaranteed to be included first, but it works with current build script)...
2011 Aug 18
0
Call super methods from inherited classes R.oo
...graped from another post
- thx to YuriWerewolf ;-).
*ClassA*
setConstructorS3("ClassA", function(A) {
extend(Object(), "ClassA",
.size = A
);
})
setMethodS3("print", "ClassA", function(this,...) {
print(paste('Class A:',this$.size));
})
*ClassB (inherits ClassA)*
setConstructorS3("ClassB", function(B=15) {
extend(ClassA(), "ClassB",
.something = B
);
})
# Now I would like to extend the behavior of the super$print() method. It is
not intended to
# get rid of the super$mehtods logic but to execute it too and add...
2009 Jul 05
0
[LLVMdev] How to add an include file
On Sun, Jul 5, 2009 at 1:16 PM, David Minor<dahvid.minor at gmail.com> wrote:
> I'm writing a code transformation that involves adding an include to
> existing code, adding a base class
> to and existing class and then linking with a previously compiled library.
> The main problem for me
> seems to be how can I add the include? Can I compile the include alone to
> byte
2009 Jul 08
1
[LLVMdev] How to add an include file
...Eli,
> > Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp
> > to product a library libClassA.a.
> > ClassA.h contains the single declaration.
> >
> > class A {...};
> >
> > I want to transform it to:
> >
> > #include "ClassB.h"
> >
> > class A : public class B {...};
> >
> > ClassB.h is the header file for a library libClassB.a built from
> ClassB.cpp
> > and ClassB.h.
> > I can clearly link libClassB with libClassA. But how can I bring in the
> > header file so that it...
2009 Jul 05
2
[LLVMdev] How to add an include file
I'm writing a code transformation that involves adding an include to
existing code, adding a base class
to and existing class and then linking with a previously compiled library.
The main problem for me
seems to be how can I add the include? Can I compile the include alone to
byte code and pre-pend it?
Should I compile the library, which includes the include and parse out the
include and
2003 Oct 02
1
"[[<-","[[" default?
Hi!
I have implemented class specific behaviour of "[[<-.myclass"<-function().
How it is posible to call the "[[.default" on an object of myclass?
Eryk
Dipl. bio-chem. Eryk Witold Wolski @ MPI-MG Dep. Vertebrate Genomics
Ihnestrasse 73 14195 Berlin 'v'
tel: 0049-30-84131285 / \
mail: wolski@molgen.mpg.de ---W-W----
2007 Jul 29
7
RDig and AAF playing together
...I modified RDig to accept an array of
search_paths with an element for index A and index B.
However, when Index B is updated by AAF, RDig.searcher.search will
not "see" the changes to Index B until I restart Mongrel (or restart
script/console). If I query Index B directly through
ClassB.find_by_contents("myfield:my_value") I see the updated results
immediately with no restart.
I know that RDig creates a single IndexReader for class. Does the
IndexReader cache the segments files in memory?
Does anyone have any ideas?
Thanks in advance for your help!
Erik
2003 Sep 18
1
2 time dependend states and probability transition matrix
...ulate me a probability transition matrix with a data.frame and two states.
I have some independend variable and a class variable
for two states - in example one from Jan2003 and the same variables from June2003.
Now i would like to calculate the probability that PERSON X change
from classA to classB between this time-period dependend from
the independend variables.
Until now i think about an "easy" function what use the Bayes-Theorem, but it's too bad that i'm
not a mathematican.
Thanks for any starting point, idea, link or paper!
P.S.
I now the msm package, but think it...
2007 Jul 12
11
Problem with "defined" keyword
Hi,
I''m running Puppet 0.23.0 on my servers, and i got something like this:
In a classa.pp file (included in site.pp):
class A {
file { "test1":
...
}
}
In a classb.pp file (included in site.pp):
class B {
file { "test2":
...
}
if defined(File["test1"]) {
... do things ...
}
if defined(File["test2"]) {
... do things ...
}
}
The problem i got is the first "if defined" is n...
2011 Jun 23
1
Class not found when search in .onLoad
Hi,
I am facing with a strange behaviour of isClass and extends when these
are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing
my package from doing some object initializations at a proper place
(i.e. in .onLoad).
Suppose one defines two S4 classes in a package, and that one needs to
check the inheritance between these two when loading the package (e.g.
to validate slots
2013 Feb 06
1
[LLVMdev] Process the initializers of a C++ class properly
Hi,
I have been trying to get information from the initializers of a C++
class. For example if I have something like this:
classA { };
classB :public A {
float f;
public:
B(A& a) : A(a), f(3.14159) { }
};
I wold like to get the initialization values for each member. In this
example the values a and 3.14159 for the members A and f respectively.
What I have done so far is this:
I am using the method VisitCXXConstruc...
2012 Apr 13
0
Reference Class import() behaviour
...methods = list(
initialize = function(vps = NULL, gt = NULL, nums = 1:10) {
vps <<- vps
gt <<- gt
nums <<- nums
},
view = function() {
print(vps)
print(gt)
print(nums)
}))
b.gen <- setRefClass("classB", contains = "classA")
library(grid)
my.vps <- vpTree(viewport(name = "parent"),
vpList(viewport(name = "child")))
my.gtree <- gTree(name = "tree",
children = gList(rectGrob(vp = "parent"),...
2005 Aug 21
0
Patch for Element.Class - wrong regexp
...(regEx, '''')
}
},
@@ -232,14 +232,23 @@
}
},
- // returns true if all given classes exist in said element
+ // expects arrays of strings and/or strings as optional paramters
+ // Element.Class.has_any(element, [''classA'',''classB'',''classC''], ''classD'')
has: function(element) {
element = $(element);
if(!element || !element.className) return false;
var regEx;
for(var i = 1; i < arguments.length; i++) {
- regEx = new RegExp("\\b" +...