search for: representation

Displaying 20 results from an estimated 6977 matches for "representation".

2005 Aug 18
2
Use of contains in S4 classes
setClass("B", representation=representation("B", extra="numeric)) setClass("B", representation=representation(extra="numeric"), contains="B") Are these the same? If not, how do they differ? What about setClass("B", representation=representation("B", extra=&quo...
2008 Mar 26
5
S4 slot with NA default
...an expensive operation, not needed for all applications). When its value is known, I will create a new object with the correct value inserted in the slot. I want "NA" to signify "not known". My attempt fails because NA is not numeric: > setClass ("foo",representation=representation(x="numeric"),prototype=list(x=NA)) Error in makePrototypeFromClassDef(properties, ClassDef, immediate, where) : in making the prototype for class "foo" elements of the prototype failed to match the corresponding slot class: x (class ?numeric? ) > (the...
2013 Feb 05
1
S4 Classes and Initialize methods
...ar in my mind I declare two classes, namely "A", and "B", which has a slot of type A. The class "A" has an initialize method. What I do not understand is that the Class A initialize-method is run when defining the Class B Here is the code . > setClass("A",representation=representation(a="numeric")) > setMethod("initialize","A",function(.Object){cat("*** initialize A ***\n");return(.Object)}) [1] "initialize" > > > setClass("B",representation=representation(a="A",b="numeric"...
2011 Apr 27
3
[LLVMdev] confused about float literals
...float* %f >>  store double 3.145000e+00, double* %f1 >>  store i32 0, i32* %1 >>  %2 = load i32* %1                               ; <i32> [#uses=1] >>  ret i32 %2 >> } >> >> This is very strange - what is 0x400928F5C0000000 ??? >> the 32 bit hex representation of 3.145 is 0x404947ae, and, >> the 64 bit hex representation of 3.145 is 0x400928f5c28f5c29 > > For murky historical reasons, float literals are represented as > if they were doubles, but with the precision of a float.  It does > not change their semantics. But what is 0x400928F...
2004 Sep 29
1
Problem with _new_ if class "lm" in object representation.
Hi! Consider this code. setClass("Ctest" ,representation( test="character" ,bla="character" ,mod="lm" ) ) new("Ctest",test="bla") #This produces an error. #Error in validObject(.Object) : Invalid "Ctest" object: Invalid object for slot "mod" in class &q...
2015 May 11
3
[LLVMdev] LLD improvement plan
Nobody in this long thread appears to have yet explained why it's a bad idea to allow atomic fragments of code/data (whatever you want to call them: atoms, sections, who cares) to have more than one global symbol attached to them in LLD's internal representation. That seems like it'd provide the flexibility needed for ELF without hurting MachO. If that change'd allow you to avoid splitting the linker into two-codebases-in-one, isn't that preferable? On Thu, May 7, 2015 at 9:38 AM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:...
2010 Aug 18
1
Automatically retrieve correct collation
Dear List, consider the following scenario: setClass(Class = "A", representation = representation(B = "B", C = "C")) setClass(Class = "B", representation = representation(C = "C")) setClass(Class = "C", representation = representation(something = "character")) Obviously, the collation for sourcing these defs needs t...
2020 Jan 30
2
Writing loop transformations on the right representation is more productive
...m Mo., 27. Jan. 2020 um 22:06 Uhr schrieb Uday Kumar Reddy Bondhugula < uday at polymagelabs.com>: > Hi Michael, > > Although the approach to use a higher order in-memory abstraction like the > loop tree will make it easier than what you have today, if you used MLIR > for this representation, you already get a round trippable textual format > that is *very close* to your form. The affine.for/if, std.for/if in MLIR > are nearly isomorphic to the tree representation you want, and as such, > this drastically reduces the delta between the in-memory data structures > your passes...
2020 Oct 10
2
Undef and Poison round table follow-up & a plan
> > Okay, it's just not immediately undefined behaviour. The C model has more > issues because of the problem with how "trap representation" is defined > (which precludes trap representations for unsigned char, two's complement > signed char, etc.). This interpretation is further stressed because C only explicitly ascribes > undefined behaviour to trap representations on loads and stores. In this case, freeze(poiso...
2002 Nov 06
0
[LLVMdev] DSGraph implementation status update
Hi all DSGraph users... This is a note to let you know that I just checked in a rather large change to the data structure graph representation. Here are the bonuses of the new representation: 1. Only the DSNode interface changed, mostly in implementation details, so hopefully client code shouldn't be effected. As a metric, nothing had to change in BottomUp or TopDownClosure.cpp for the new representation. The biggest chang...
2018 Jun 07
2
[RFC] Abstract Parallel IR Optimizations
...sm == We currently perform poorly when it comes to optimizations for parallel codes. In fact, parallelizing your loops might actually prevent various optimizations that would have been applied otherwise. One solution to this problem is to teach the compiler about the semantics of the used parallel representation. While this sounds tedious at first, it turns out that we can perform key optimizations with reasonable implementation effort (and thereby also reasonable maintenance costs). However, we have various parallel representations that are already in use (KMPC, GOMP, CILK runtime, ...) or proposed (Tapir...
2011 Sep 10
3
Very slow using S4 classes
...tExamples of the S4 object. However, many operations after this take a considerable time. Can anyone explain me why dois it happen? Is it possible to speed up an script that deals with a big number of data (it might be data.frame or list)? Thank you, André Rossi setClass("Buffer", representation=representation( Listexamples = "list", idx = "integer" ) ) [[alternative HTML version deleted]]
2010 Oct 20
1
[LLVMdev] Re : How to assign a constant to a register?
leledumbo, from what you say, I assume you have some kind of representation (AST or a lower-level intermediate representation) from which you generate LLVM assembly. Is this representation in SSA form? If it is, you might want to do a "copy propagation" transformation that replaces the uses of all variables that are assigned a constant value by their definitio...
2011 Feb 12
2
Linked List in R
Hi, I am trying to create a linked list in R by defining a class Node which has a instance variable Node. setClass("Node", representation(rate="numeric", nextNode="ANY")) The above works. But the following gives me a warning message. setClass("Node", representation(rate="numeric", nextNode="Node")) > > setClass("Node", representation(rate="numeric", nex...
2003 May 30
2
Creating a vector class
I'm trying to create a package for working on orientation data, i.e. data where the observations are 3D rotations. There are several different representations of orientations in common use: SO(3) matrices, Euler angles, unit quaternions, etc. One thing I'd like is to make it convenient to work in any representation, and have conversions to others done as needed. I'm trying to do all of this in S4 classes. Here's the current class structu...
2009 May 17
2
Output of binary representation
I am interested in studying the binary representation of numerics (doubles) in R, so am looking for possibilities of output of the internal binary representations. sprintf() with format "a" or "A" is halfway there: sprintf("%A",pi) # [1] "0X1.921FB54442D18P+1" but it is in hex. The following illustrate the...
2008 Feb 08
2
learning S4
Hi the list. I try to learn the S4 programming. I find the wiki and several doc. But I still have few questions... 1. To define 'representation', we can use two syntax : - representation=list(temps = 'numeric',traj = 'matrix') - representation(temps = 'numeric',traj = 'matrix') Is there any difference ? 2. 'validityMethod' check the intialisation of a new object, but not the latter...
2016 Mar 18
2
unary class union of an S3 class
Hi, Short story ----------- setClassUnion("ArrayLike", "array") showClass("ArrayLike") # no slot setClass("MyArrayLikeConcreteSubclass", contains="ArrayLike", representation(stuff="ANY") ) showClass("MyArrayLikeConcreteSubclass") # 2 slots!! That doesn't seem right. Long story ---------- S4 provides at least 3 ways to create a little class hierarchy like this: FooLike ............. virtual class with no slot ^ ^...
2018 Aug 09
1
Bug in POSIXct string representation?
..." Now create a sequence of POSIXct with stepwidth 0.1sec: > test <- as.POSIXct("2018-08-31 14:15:16.000000") > test_seq <- seq(test, test + 1, by = 1/10) Calling format with the millisecond conversion specification gives the intended result (even though there is a small representation error): > format(test_seq, "%F %T.%OS") [1] "2018-08-31 14:15:16.16.000000" "2018-08-31 14:15:16.16.099999" "2018-08-31 14:15:16.16.200000" "2018-08-31 14:15:16.16.299999" [5] "2018-08-31 14:15:16.16.400000" "2018-08-31 14:15:16....
2009 Jun 29
1
S4 and connection slot [Sec=Unclassified]
Hi all, I am having a problem trying to declare a slot representation to hold a file connection. With V2.8.0 I had been using: setClass("Element", representation( [other slots removed], datafileConn = setOldClass(c("file","connection")) ) ) This resulted in a warning but still ran okay. No howeve...