search for: newvalu

Displaying 20 results from an estimated 62 matches for "newvalu".

Did you mean: newval
2008 Feb 05
2
help with oop in R - class structure and syntex
...ic int speed; // *the Bicycle class has one constructor* public Bicycle(int startCadence, int startSpeed, int startGear) { gear = startGear; cadence = startCadence; speed = startSpeed; } // *the Bicycle class has four methods* public void setCadence(int newValue) { cadence = newValue; } public void setGear(int newValue) { gear = newValue; } public void applyBrake(int decrement) { speed -= decrement; } public void speedUp(int increment) { speed += increment; } } Could one of the R experts ple...
2006 Jul 07
1
replace values in data frame
Hi all, I have a three columned list that I have imported into R. The first column is a plot (ex. Plot1), the second is a species name (ex ACERRUB) and the third a numeric value. I want to replace some of the second column names with other names (for example replace ACERRUB with ACERDRU). The original and replacement values are in separate lists (not vectors), but I can't seem to find the
2005 Dec 13
1
correct C function usage
...mined in the C function and is always maximally as large as length(values). I also don't understand the purpose of $ab in the example: conv <- function(a, b) .C("convolve", -snip- ab = double(length(a) + length(b) - 1))$ab void testFill(int *values, int *newvalues, int* endposition ){ newvalues[0] = 1; newvalues[1] = 2; *endposition = 2; } dyn.load("../testFill.so") testTestFill <- function(){ tempfilled <- testFillC( c(30:40)) realfilled <- tempfilled$newvalues[1:tempfilled$endposition] return(realfill...
2012 Feb 03
2
[LLVMdev] How to properly use copyValue?
Since there are no constructors for Value, how do you properly insert a new Value? If I create a pointer Value *newValue and then call AA.copyValue(oldValue, newValue), this does not work, since newValue is not allocated. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120203/44086cf5/attachment.html>
2015 Apr 30
2
búsqueda y sustitución masiva
...V1 es la lista de url originales (más de 15K) url.des$url1 es la lista de url originales únicas url.des$url2 es la lista de url descomprimidas equivalentes a url.des$url1 El último código con el que he probado es el siguiente pero sin buenos resultados: recoderFunc <- function(data, oldvalue, newvalue) { # convertir los factores en caracteres if (is.factor(data)) data <- as.character(data) if (is.factor(oldvalue)) oldvalue <- as.character(oldvalue) if (is.factor(newvalue)) newvalue <- as.character(newvalue) # crear el vector de retorno newvec <- data # pon...
2012 Feb 04
0
[LLVMdev] How to properly use copyValue?
...r wrote: > Since there are no constructors for Value, how do you properly insert a > new Value? Value is a pure base. If you want to construct a new Value, then you want to construct a global variable or instruction or argument or something in particular. > If I create a pointer Value *newValue and then call > AA.copyValue(oldValue, newValue), this does not work, since newValue is > not allocated. AA.copyValue is used to tell the AliasAnalysis that a transformation is replacing the instruction in oldValue with newValue, so AA should update its internal tables. (Note that BasicAA...
2012 Feb 05
1
[LLVMdev] How to properly use copyValue?
...ctors for Value, how do you properly insert a >> new Value? >> > > Value is a pure base. If you want to construct a new Value, then you want > to construct a global variable or instruction or argument or something in > particular. > > > If I create a pointer Value *newValue and then call >> AA.copyValue(oldValue, newValue), this does not work, since newValue is >> not allocated. >> > > AA.copyValue is used to tell the AliasAnalysis that a transformation is > replacing the instruction in oldValue with newValue, so AA should update > its i...
2009 Sep 10
1
trouble with custom type on 0.24.8
...able newparam(:name) do desc "The name of the repository" isnamevar end newparam(:enabled) do desc "Enabled status of the repository" newvalues(:yes, :no) defaultto "yes" end newparam(:refresh) do desc "Refresh status of the repository" newvalues(:yes, :no) defaultto "yes"...
2013 May 07
6
[LLVMdev] Predicated Vector Operations
...was before the instruction executed. I've seen a few places that suggest 'select' is the proper way to implement predication. I believe the predicated form cannot be explicitly expressed in LLVM asm, because it is SSA. It can be done implicitly: %sum = add <16 x i32> %x, %y %newvalue = select <16 x i1> %mask, <16 x i32> %sum, <16 x i32> %oldvalue The issue becomes how to match the instruction form above in a TableGen pattern. In order for this to emit a masked instruction, %newvalue and %oldvalue must be assigned to same physical register (I'm assuming a...
2013 May 08
0
[LLVMdev] Predicated Vector Operations
...d. > > I've seen a few places that suggest 'select' is the proper way to > implement predication. I believe the predicated form cannot be > explicitly expressed in LLVM asm, because it is SSA. It can be done > implicitly: > > %sum = add <16 x i32> %x, %y > %newvalue = select <16 x i1> %mask, <16 x i32> %sum, <16 x i32> > %oldvalue This is not necessarily sufficient in general. For any operation that can trap (pretty much any fp operation) you also need to protect the inputs with safe values to adhere to the semantics of the LLVM IR. Fo...
2007 Oct 06
1
override variables
Hi, I am trying to allow certain nodes to override variables in inherited classes. Here''s an example: node ''my.server.com'' inherits webserver {} node ''other.server.com'' inherits webserver { $var = "newvalue" } node webserver { $var = "value" include snmp, dns, classx } In this example classx ends up using $var = "value" but I want to use the "newvalue". Is this possible? Thanks, Ryan _______________________________________________ Puppet-us...
2011 Apr 05
1
question about assignment warnings for replacement methods
...above? This is a person who just wants to show the proper usage for a replacement method. IOW they just want to write something that looks like what you actually do when you use a replacement method. They just want to show users how to do something like this: replacementMethod(object) <- newValue So is that really something that should not be allowed in a usage statement? Marc
2006 Sep 18
0
Question on apply() with more information...
...y out, but just an excerpt of Xarray >> >> x <- c(0.11,0.25,0.45,0.65,0.80,0.95,1) >> Y <- >> matrix(c(15,83,57,111,150,168,175,37,207,142,277,375,420,437),nrow=2) >> >> sm <- function(y,x){smooth.spline(x,y)} SmoothList <- apply(Y,1,sm,x) >> NewValues <- function(x,LIST){predict(LIST,x)} Xarray <- >> matrix(c(0.15,0.56,0.66,0.45,0.19,0.17,0.99,0.56,0.77,0.41,0.11,0.63,0 >> .42,0. 43),nrow=2) >> >> >> apply(Xarray, 2, NewValues,SmoothList) apply(Xarray, 2, >> NewValues,LIST=SmoothList) >> &gt...
2013 May 10
0
[LLVMdev] Predicated Vector Operations
...That is the trickty part as far > as I can see and is why this isn't quite the same as handling > two-address instructions. >From the semantics of your program? %tx = select %mask, %x, <0.0, 0.0, 0.0 ...> %ty = select %mask, %y, <0.0, 0.0, 0.0 ...> %sum = fadd %tx, %ty %newvalue = select %mask, %sum, %oldvalue << From here? If you had a designated predicated instruction you would have the same issue. The %oldvalue has to come from somewhere (or be undefined). %oldval = ... | undef %newvalue = predicated_fadd %mask, %left, %right, %oldval I guess, I don’t underst...
2008 Jun 27
4
Recoding
Hi! Given a vector (or a factor within a df),i.e. v1 <- c(1,1,1,2,3,4,1,10,3) and a dictionary cbind(c(1,2,3),c(1001,1002,1003)) is there a function (on the same line than recode() in car) to get v2 as c(1001,1001,1001,1002,1003,4,1001,10,1003) ? I'm using myself a function based on match() since long ago (I think that thanks to advice by Prof. B. Ripley), but would like to know if there
2013 May 09
0
[LLVMdev] Predicated Vector Operations
On Thu, May 9, 2013 at 8:10 AM, <dag at cray.com> wrote: > Jeff Bush <jeffbush001 at gmail.com> writes: > >> %tx = select %mask, %x, <0.0, 0.0, 0.0 ...> >> %ty = select %mask, %y, <0.0, 0.0, 0.0 ...> >> %sum = fadd %tx, %ty >> %newvalue = select %mask, %sum, %oldvalue >> >> I believe the generated instructions depend on whether %oldvalue is >> still live after the last instruction. If it is, you need to generate >> two instructions: a copy into a new physical register then predicated >> write to it....
2013 May 09
2
[LLVMdev] Predicated Vector Operations
...May 9, 2013 at 8:10 AM, <dag at cray.com> wrote: >> Jeff Bush <jeffbush001 at gmail.com> writes: >> >>> %tx = select %mask, %x, <0.0, 0.0, 0.0 ...> >>> %ty = select %mask, %y, <0.0, 0.0, 0.0 ...> >>> %sum = fadd %tx, %ty >>> %newvalue = select %mask, %sum, %oldvalue >>> >>> I believe the generated instructions depend on whether %oldvalue is >>> still live after the last instruction. If it is, you need to generate >>> two instructions: a copy into a new physical register then predicated >&...
2012 Aug 16
3
[LLVMdev] error: instruction requires: thumb2
...ror: instruction requires: thumb2 "ldrex %[oldValue], [%[ptr], #0]\n" // oldValue = *ptr ^ <inline asm>:1:2: note: instantiated into assembly here ldrex r6, [r4, #0] ^ main.c:11:3: error: instruction requires: thumb2 "strexeq %[failed], %[newValue], [%[ptr], #0]\n" ^ <inline asm>:3:1: note: instantiated into assembly here strexeq r5, lr, [r4, #0] ^ 2 errors generated. ------------------------------------------------------- In the main.c, some ARM assembly are embedded which contains instructions ldrex, strexeq. I don...
2010 Oct 06
1
R getting slower until it breaks...
...lculNDVI,nrow=VALUE[[3]],ncol=VALUE[[3]], byrow=TRUE) NDVImatrix <- NDVImatrix + 1 NDVImatrix <- NDVImatrix * (255/2) return(NDVImatrix) } ################################################################################# ## Fonction 1b - Faire le tiff make.tiff<- function(NV=newValues,TT=Type,img=imgRaster,nom){ pixelNDVIMatrix <- calculate_NDVI(TT,img,NV[c(1,2,3)]) newRaster <- raster(pixelNDVIMatrix) NAvalue(newRaster)<-999999 nnom<-nom[NV[4]] writeRaster(newRaster, filename=nnom,datatype="INT1U",format="GTiff",overwrite=FALSE) aaa<-2...
2012 Aug 16
0
[LLVMdev] error: instruction requires: thumb2
...gt; "ldrex %[oldValue], [%[ptr], #0]\n" // oldValue = *ptr > ^ > <inline asm>:1:2: note: instantiated into assembly here > ldrex r6, [r4, #0] > ^ > main.c:11:3: error: instruction requires: thumb2 > "strexeq %[failed], %[newValue], [%[ptr], #0]\n" > ^ > <inline asm>:3:1: note: instantiated into assembly here > strexeq r5, lr, [r4, #0] > ^ > 2 errors generated. > ------------------------------------------------------- > > In the main.c, some ARM assembly are embedded which conta...