search for: subvector

Displaying 20 results from an estimated 47 matches for "subvector".

2008 Jan 07
3
Seeking a more efficient way to find partition maxima
Hi. Suppose I have a vector that I partition into disjoint, contiguous subvectors. For example, let v = c(1,4,2,6,7,5), partition it into three subvectors, v1 = v[1:3], v2 = v[4], v3 = v[5:6]. I want to find the maximum element of each subvector. In this example, max(v1) is 4, max(v2) is 6, max(v3) is 7. If I knew that the successive subvector maxima would never decrease, a...
2010 May 04
1
Avoiding for-loop for splitting vector into subvectors based on positions
Dear all, I'm trying to optimize code and want to avoid for-loops as much as possible. I'm applying a calculation on subvectors from a big one, and I get the subvectors by using a vector of starting positions: x <- 1:10 pos <- c(1,4,7) n <- length(x) I try to do something like this : pos2 <- c(pos, n+1) out <- c() for(i in 1:n){ tmp <- x[pos2[i]:pos2[i+1]] out <- c(out, length(tmp)) } Nev...
2009 Apr 17
1
matching subvectors in vector sets
...[5] "A00036:A00047:A00059:A00503:A00904:A00904:A00904:A01023:A01023:A01399:A02029:A03941:A07679" [6] "A00041:A00533:A00855:A02178:A02178:A02178:A05671:A05671:A05671:A05671:A05671:A05671:A05671" ... And I would like to have a table with the frequency of occurrences for matching subvectors in all elements, i.e., not only the number of times a vector is found but also how many times a subvector (of at least 2 ids) is found. How can I do that? Thanks in advance, Albert. [[alternative HTML version deleted]]
2007 Feb 01
3
Can this loop be delooped?
Hi. I have the following code in a loop. It splits a vector into subvectors of equal size. But if the size of the original vector is not an exact multiple of the desired subvector size, then the first few subvectors have one more element than the last few. I know that the cut function could be used to determine where to break up the vector, but it doesn't seem t...
2009 Aug 25
3
Regular expression to define contents between parentheses
...oks more or less like this: myvector<-c("something (80 km/h, sd) & more (6 kg/L,sd)", "somethingelse (48 m/s, sd) & moretoo (50g/L , sd)") I want to extract all the strings that are not contained in parenthesis, the goal would be to obtain the following new vector: subvector<-c("something & more", "somethingelse & moretoo") I tried the following, but this pattern seems to enclose all that is included between the first opened parenthesis and the last closed parethesis, which makes sense, but it's not what I need: subvector<-gsub(&...
2017 Feb 08
2
ShuffleKind SK_ExtractSubvector
Hi, I am a little unsure about the semantics of the ShuffleKind SK_ExtractSubvector. It seems a subvector is to be extracted, starting from a given index of a given subtype. First of all, if index 0 is passed, I suppose this would mean a noop? But what about calls like the one made of LoopVectorizer for Instruction::PHI in getInstructionCost(): return TTI.getShuffleCost(Targe...
2010 Sep 19
1
Weibull- Random Censoring
I generate random vector from Weibull distribution sampWB <-urweibull(sampleSize, shape=shape.true, scale=scale.true, lb=0, ub=Inf) how can I create subvector containing 30% of samplesize of sampWB which should be assigned as Censored data? The probability for each value in sampWB can be uniform to be included in the subvector.
2010 Apr 20
2
[LLVMdev] SplitVectorOp from CopyFromReg
Hello, I have a kernel that's swizzling a vector inside a loop. The vector was created before the loop. The first node in the dag is an extract subvector which calls into SplitVectorOp. The issue is that the node passed to it comes from a CopyFromReg and SplitVectorOp doesn't know what to do. Is there a reason why SplitVectorOp doesn't handle CopyFromReg nodes? If not, can I submit a patch to add support? Thanks, Javier
2010 Jan 11
2
help needed to find zero areas in a vector
...,0,1,1,0,0,0,0,1,1,0,0,0,0). It can be a very long vector. How to sub vectors of 0s? In the above example, I would like get the vectors (0,0), (0,0,0,0), (0,0,0,0). I can use which(x==0) to get the index of the 0 elements, but I don't know how to get the starting indices and end indices of the subvectors. Maybe we should use which(x==1), but I don't know how.   Thanks.   Bob [[alternative HTML version deleted]]
2011 Feb 10
2
Repeaded sampling
Hi all, I have a dataset. Each time I want to sample N(i) elements from it and I want to repeated sampling M times. N(i) is varied from time to time. For example, dataset = 1:50; a = list(); M = 1000; I want to do something like for(i in 1:M) { a[[i]] = sample(dataset,
2003 May 16
2
Efficient subsetting
Hi, I'm facing this problem quite a lot, so it seems worthwhile to check to see what the most efficient solution is. I've two vectors x (values ordered) and y. I've ranges x < x0, x0 <= x < x1, x1 <= x < x2, x2 <= x < x3, x > xn and want to construct a subvector yprime of y which consists of the first/last value of y whose x values are in the range. For example, x y 1 2 1 3 2 3 3 4 4 5 5 6 and let's say the ranges are 1 <= x < 3 and 3 <= x < 5. I should produce yprime as c( 2, 4 ) (if I ask for the first value of y whose x...
2010 Apr 20
0
[LLVMdev] SplitVectorOp from CopyFromReg
Hi Javier, > I have a kernel that's swizzling a vector inside a loop. The vector was > created before the loop. The first node in the dag is an extract subvector > which calls into SplitVectorOp. The issue is that the node passed to it > comes from a CopyFromReg and SplitVectorOp doesn't know what to do. Is > there a reason why SplitVectorOp doesn't handle CopyFromReg nodes? If not, > can I submit a patch to add support? a testcase woul...
2004 Aug 06
1
Sub Vector Quantization of Innovation
Hi I am a student and working on Speech Coding and Speex. I just want to know where to get the document describing subvector quantization of innovation. Is there any document which can help me know how C code works or any paper exactly explainin the idea? regards Faisal __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/
2018 Jun 15
2
[RFC][SVE] Supporting SIMD instruction sets with variable vector lengths
...and pass it into a NEON library? It is likely that some math functions, for example, will not have SVE versions available. I don't believe we intend to support this, but instead provide libraries with SVE versions of functions instead. The problem is that you don't know how many NEON-size subvectors exist within an SVE vector at compile time. While you could create a loop with 'vscale' number of iterations and try to extract those subvectors, I suspect the IR would end up being quite messy and potentially hard to recognize and optimize. The other problem with calling non-SVE function...
2011 Oct 30
2
jarquebera_test_results
Hi! I got a loop where i print out the results of Jarque Bera tests, but I have to put, the p-values in a vector. Can you help me how to do it in an effective way and not just typing in the results to a vector? Thanks a lot, here is the code: for(i in 1:60){ print(jarque.bera.test(loghozamok[((20*(i-1))+1):(20*(i+11))]))}
2013 Jul 10
3
[LLVMdev] unaligned AVX store gets split into two instructions
...tions into two 128bit parts to allow them to execute in two separate ports. This is also what GCC and ICC do. It is very possible that the decision to split the wide vectors causes a regression. If the memory ports are busy it is better to double-pump them and save the cost of the insert/extract subvector. Unfortunately, during ISel we don’t have a good way to estimate port pressure. In any case, it is a good idea to revise the heuristics that I put in and to see if it matches the Sandybridge optimization guide. If I remember correctly the optimization guide does not have too much information on th...
2003 Feb 12
1
Na/NaN error in subsampling script
...ansect (of a given length, sample.length), that may be used to subsample from another vector of data. The important point is that once a section of the transect has been sampled, it cannot be resampled by an overlapping sub-transect. WHile there are obvious limits on the number of non-overlapping subvectors that can be taken from the original vector, I don''t think this is the source of the error message, although the error is increasingly common as more of hte original vector is sampled. Any help would be greatly appreciated. regards Nick r1<-function(transect.length,sample.length,reps...
2001 Apr 16
2
Dump utility?
Is there any dump utility that exists for vorbis streams? What I am intersted in is something that will do a break down like: How many bits are used for encoding _each_ codebooks, how many bits are used for the residue, how much is used for the lpc coefficints. A selective dump of the codebooks themselves would be nice too of course. I'm wondering if anyone has such a little dump utility.
2006 Oct 24
3
Help with understanding [[]] [] array, list, matrix referencing
Hi all, I would greatly appreciate some help understanding how R references arrays, matrices, lists, and objects using [[]] and []. I have read the R guides and several tutorials but I am not the fastest kid on the block so I am still having difficulty understanding this. For examples the following code produces a 5 element list of 2X5 random numbers that I then convert to a 2X5X5 matrix.
2013 Jul 10
2
[LLVMdev] unaligned AVX store gets split into two instructions
...o execute in two separate ports. This is also what GCC and >> ICC do. >> >> It is very possible that the decision to split the wide vectors causes a >> regression. If the memory ports are busy it is better to double-pump them >> and save the cost of the insert/extract subvector. Unfortunately, during >> ISel we don’t have a good way to estimate port pressure. In any case, it is >> a good idea to revise the heuristics that I put in and to see if it matches >> the Sandybridge optimization guide. If I remember correctly the >> optimization guide does...