search for: invec

Displaying 11 results from an estimated 11 matches for "invec".

Did you mean: nvec
2007 Aug 24
4
Turning a logical vector into its indices without losing its length
...which gives me what I want for temp based on logvec but I was wondering if there was a shorter way ( i.e : a one liner ) without having to initialize temp to zeros. This is purely for learning purposes. Thanks. logvec <- c(TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE,FALSE) temp<-numeric(length(invec)) temp[invec]<-which(invec) temp [1] 1 0 0 4 0 0 7 0 obviously, the code below doesn't work. temp <- which(invec) > temp [1] 1 4 7 -------------------------------------------------------- This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
2008 Oct 20
2
R Newbie Question
...ar2center[1] = 0.5 star2center[2] = 0 star2mass = 1 sqr = function(x) { return(x * x) } distance = function(a, b) { return(sqrt(sqr(a[1] - b[1]) + sqr(a[2] - b[2]))) } len = function(x) { return(sqrt(sqr(x[1]) + sqr(x[2]))) } norm = function(x) { return(x / len(x)) } gravitation = function(invecx, invecy) { invec = vector("numeric", 2) invec[1] = invecx invec[2] = invecy vec1 = star1mass * norm(star1center - invec) / sqr(distance(invec, star1center)) vec2 = star2mass * norm(star2center - invec) / sqr(distance(invec, star2center)) return(len(vec1 + vec2)) } vmin = -1 vmax =...
2009 Dec 16
2
What is the fastest way to see what are in an RData file?
Currently, I load the RData file then ls() and str(). But loading the file takes too long if the file is big. Most of the time, I only interested what the variables are in the the file and the attributes of the variables (like if it is a data.frame, matrix, what are the colnames/rownames, etc.) I'm wondering if there is any facility in R to help me avoid loading the whole file.
2007 Nov 26
3
Time Series Issues, Stationarity ..
Hello, I am very new to R and Time Series. I need some help including R codes about the following issues. I' ll really appreciate any number of answers... # I have a time series data composed of 24 values: myinput = c(n1,n2...,n24); # In order to make a forecasting a, I use the following codes result1 = arima(ts(myinput),order = c(p,d,q),seasonal = list(order=c(P,D,Q))) result2 =
2012 Aug 01
0
[LLVMdev] X86 isTargetShuffle Question
...performed by DAGCombiner, but /// shuffles have been customed lowered so we need to handle those here. static SDValue XFormVExtractWithShuffleIntoLoad(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI) { [...] if (!isTargetShuffle(InVec.getOpcode())) return SDValue(); [...] } It seems like we'd want to be able to "find scalars" or fold loads in as many different kinds of shuffle as possible. But a whole bunch went missing between 2.9 and 3.1, particularly AVX shuffles. Can someone explain what happened here?...
2005 Mar 04
0
Ti sei cancellato con successo
Ecco fatto, da domani non riceverai più la mia mail quotidiana... peccato... Se vuoi dirci perchè ti sei cancellato basta rispondere in automatico a questa mail e noi la leggeremo. Se invece ti sei cancellato per sbaglio puoi reiscriverti o mandando una mail (anche vuota) a: subscribe.modelle@it.buongiorno.com o andando sul sito www.tuttinudi.it Buona giornata Lo staff di tuttinudi
2007 Jul 30
2
EditingCentOSWiki in Italian
= Linee guida per la modifica del Wiki di CentOS = Questa pagina contiene alcune linee guida per la modifica del Wiki. Poich? queste linee guida sono in divenire, ricordatevi di tornare su questa pagina ogni tanto. == Linee guida riguardo al markup del Wiki == * Usare link relativi invece che link assoluti o link liberi. I link relativi devono avere la forma seguente: {{{[:Percorso:Testo collegato]}}} Per esempio, per collegare la sottopagina "Bar" a questa pagina, si dovrebbe usare: {{{[:/Bar:Questo testo sar? il link]}}} * Se le vostre pagine cominciano a diventare tro...
2010 Mar 19
2
Dataframe calculations
Hi everyone, My question will probably seem simple to most of you, but I have spent many hours trying to solve it. I need to perform a series of sequential calculations on my dataframe that move across rows and down columns, and then repeat themselves at each unique 'MM' by 'DD' grouping. Specifically, I want to add 'DEPART' time (24 hr time) to 'TRAVEL'(minutes)
2009 May 21
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On Wed, May 20, 2009 at 4:55 PM, Dan Gohman <gohman at apple.com> wrote: > Can you explain why you chose the approach of using a new pass? > I pictured removing LegalizeDAG's type legalization code would > mostly consist of finding all the places that use TLI.getTypeAction > and just deleting code for handling its Expand and Promote. Are you > anticipating something more
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On May 20, 2009, at 1:34 PM, Eli Friedman wrote: > On Wed, May 20, 2009 at 1:19 PM, Eli Friedman > <eli.friedman at gmail.com> wrote: > >> Per subject, this patch adding an additional pass to handle vector >> >> operations; the idea is that this allows removing the code from >> >> LegalizeDAG that handles illegal types, which should be a significant
2009 May 21
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...ned i = 0; i != NewNumElts_Lo; ++i) { - SDValue IdxNode = Mask.getOperand(i); - if (IdxNode.getOpcode() == ISD::UNDEF) { - Ops.push_back(DAG.getUNDEF(NewEltVT)); - continue; - } - unsigned Idx = cast<ConstantSDNode>(IdxNode)->getZExtValue(); - SDValue InVec = Node->getOperand(0); - if (Idx >= NumElements) { - InVec = Node->getOperand(1); - Idx -= NumElements; - } - Ops.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, NewEltVT, InVec, - DAG.getConstant(Idx, PtrVT))); - } - Lo...