search for: pseudocod

Displaying 20 results from an estimated 244 matches for "pseudocod".

Did you mean: pseudocode
2006 Dec 05
2
intro + specification remarks + some questions
...; n--) if (v[n]<v[x]) return n; B) low_neighbor(v, x) { max_pos = 0; for (n=0...x-1) if (v[n] < v[x]) if (v[n] >= v[max_pos]) max_pos = n; return max_pos; } In case of A), perhaps the specs should be rewritten for clarity, and some pseudocode could be added... In case of B), doesn't this mean that, depending on the loop and last if( ) one can get different results as in: http://bram.smartelectronix.com/tmp/low_neighbor.png ( line = vector values, red cross = x, green dots = possible values of n ) -------------------------- Sec...
2018 Jan 12
0
best way to represent this pseudocode in LLVM IR?
...%6 = add i64 %3, 1, !dbg !70 store i64 %6, i64* %1, align 8, !dbg !70 br label %ReturnError, !dbg !70 ReturnError: ; preds = %Entry ret i16 1, !dbg !70 } Everywhere that we can return an error from a function, we generate code like this. Here it is in pseudocode form: stack_trace_ptr.addresses[stack_trace_ptr.index % 31] = addressOfReturnInstruction; stack_trace_ptr.index += 1; return error_code; I'd like to try to extract some of this out to make a smaller binary size. If we extract pseudocode into a function: %0 = tail call func(ptr, addressOfRe...
2006 Apr 26
3
Article: Open Says Me
I just finished my latest contribution, "Open Says Me". http://unspace.ca/discover/opensaysme/ Managing the browser experience using JavaScript, Ajax and a Cookie. It''s built on top of Rails, of course. Feedback is always appreciated! Pete
2006 Dec 14
17
Should Event.stopObserving() remove itself from cache?
Just wondering why Event.stopObserving() doesn''t remove the itself from the Event.obervers array? Is there a reason for this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to
2007 Aug 22
1
C code generators
Dear R-helpers Are there any established R packages that include a C code generator -- that generates new C language files and compiles them? To be precise what I'm looking for is a process that takes text input in some format (it might be pseudocode, fragments of C code, etc) and creates a valid C language source file that can be compiled by R CMD COMPILE. Ideally the procedure should also cause the C code to be compiled and dynamically loaded. To give a trivial example, suppose I want to be able to perform image filtering operations on matr...
1999 Oct 04
3
Detailed decoder pseudocode (was: Re: ETA?)
> > Which part? > > Well, my biggest problem is dealing with files. As you have mentioned > that fill_buffer() is obsolete, what has replaced it? ogg_sync_buffer() > didn't seem to be what I was looking for, as far as I can tell... am I > headed in completely the wrong direction? Ah, OK, I understand where you're headed now. The libvorbis API is different than
2004 May 26
2
Subtracting number of days from a date
Hi group, suppose I have a date, say May 15 2004, and I want to now what date it is 23 days before that date. The way to calculate the new date should (...) take account of leap years :) In pseudocode: olddate <- "May 15 2004" newdate <- olddate-23 I looked around in POSIXct etc..., maybe I overlooked? Thanks, Maarten -------------------------------------------------------------- Zie ook/see also: http://www.knmi.nl/maildisclaimer.html
2008 Feb 19
2
Looping through a list of objects & do something...
...erically access their elements and do something with them. For instance, instead of this: df1<- data.frame(x=(1:5),y=(1:5)); df2<- data.frame(x=(1:5),y=(1:5)); df3<- data.frame(x=(1:5),y=(1:5)); plot(df1$x,df1$y); plot(df2$x,df2$y); plot(df3$x,df3$y); I would like to do something like: (pseudocode) dfarray[1] = df1 dfarray[2] = df2 dfarray[3] = df3 for (each i in dfarray) { plot(i$x, i$y); } Can this be done in R? Thanks. Tripp -- View this message in context: http://www.nabble.com/Looping-through-a-list-of-objects---do-something...-tp15562391p15562391.html Sent from the R help maili...
2005 Jul 15
2
Another simple q - removing negative values
Sorry folks but again I have failed in my understanding of how to do a very simple thing. I've read the various texts and searched the help archives but no positive result so far. I want to remove all the rows in a data frame where one of the variables has negative values. In approx Stata pseudocode: drop _all, if( x < 0 ) Please either point me to relevant sections of the docs or supply me with solution - I'm sure it's very simple. Michael
2012 Apr 03
2
Looking for the name of a certain kind of quantile plot
Hi, While playing with quantile-quantile plots, I wrote up some code which plots something strangely different. Here's the pseudocode: testhist <- hist(sample_data) refhist <- hist(rnorm(n, mean=0,sd=1)) # for some large-ish n cumtest <- cumsum(testhist) cumref <- cumsum(refhist) plot(cumref,cumtest) This produces a straight line of slope 1 for a sample with the same parameters as the reference sample, and produ...
2019 Feb 09
2
how experimental are the llvm.experimental.vector.reduce.* functions?
...ry store i32 %3, i32* %x, align 4, !dbg !57 call void @llvm.dbg.declare(metadata i32* %x, metadata !50, metadata !DIExpression()), !dbg !57 ret void, !dbg !58 } You can see this takes advantage of @llvm.sadd.with.overflow, which is not available with vectors. So here is a different approach (pseudocode): %a_zext = zext %a to i33 # 1 more bit %b_zext = zext %b to i33 # 1 more bit %result_zext = add %a_zext, %b_zext %max_result = @llvm.experimental.vector.reduce.umax(%result_zext) %overflow = icmp %max_result > @max_i32_value %result = trunc %result_zext to i32 You can imagine how this would...
2019 Feb 09
2
how experimental are the llvm.experimental.vector.reduce.* functions?
...date the docs at that time because it was not clear what the backend would do with that, but that might've changed with some of the more recent patches. On Sat, Feb 9, 2019 at 1:42 AM Craig Topper via llvm-dev < llvm-dev at lists.llvm.org> wrote: > I don't think I understand your pseudocode using > llvm.experimental.vector.reduce.umax. All of the types you showed are > scalar, but that intrinsic doesn't work on scalars so I'm having a hard > time understanding what you're trying to do with it. > llvm.experimental.vector.reduce.umax takes a vector input and ret...
2006 Mar 24
2
How to avoid for or while loops when one index depends on another
Dear R Community, I'm trying to exploit the elegance of R by doing the following pseudocode routine without a WHILE or FOR loop in R: for i = 1 to length-1 for j = (i+1) to length print a[i], a[j] That is, I want i and j to be the indices of a half-matrix 1 2, 1 3, 1 4, ..., 1 length, 2 3, 2 4, ..., 2 length, 3 4, ..., 3 length 1. Can this be done with the '...
2017 Dec 15
0
Register Allocation Graph Coloring algorithm and Others
...he generated code would be not much better.  So to improve RA maintainability, RA is divided on two parts solving a bit different tasks.  This is a typical engineering approach. > > * The papers by Briggs and Chaiten contradict[2] themselves when > examine the text of the paper vs. the pseudocode provided? I don't examine Preston Briggs work so thoroughly.  So I can not say that is true.  Even so it is natural that there are discrepancy in pseudocode and its description especially for such size description. For me Preston Briggs is famous for his introduction of optimistic coloring....
2006 May 19
2
"Pipelining" programs in R
...I need to run this program on a large batch of parameters, such that it would clearly be desirable to automate the process. Is there a straightforward way to do this? I can't find any online documentation addressing this topic, but perhaps I've not been looking in the right place. In pseudocode, supposing I have a large array of parameters in R: For each set of parameters -Open Program. -Enter Parameters. -Cause program to execute (typically done by simply entering " \n " after manually entering parameters). -Enter name of output file....
2006 Dec 13
2
caching frequently used values
...deriv=0) { x <- bsplinegrid$grid Matrix(splineDesign(bslinegrid$knots, x, ord=basis$order, derivs = rep(deriv,length(x)))) } However, I don't want to call splineDesign all the time. A smart way would be storing the calculated matrices in a list inside bsplinegrid. Pseudocode would look like this: bsplinematrix <- function(bsplinegrid, deriv=0) { if (is.null(bsplinegrid$matrices[[deriv+1]])) { ## compute the matrix and put it in the list bsplinegrid$matrices, ## but not of the local copy } bsplinegrid$matrices[[deriv+1]] } My problem is that I don...
2009 Oct 03
1
Passing lists and R memory usage growth
...located in each iteration. (See output below.) I also tried summing up object.size() for all objects in all environments, and the total is constant about 15 Mbytes at each iteration. But overall memory consumption as reported by gc() (and my operating system) keeps going up to 2 Gbytes and more. Pseudocode: ----------- # This function and its callees need a 'results' list some.function.1 <- function(iter, res, par) { # access res$gamma[[iter-1]], res$beta[[iter-1]] ... } # This function and its callees need a 'results' list some.function.2 <- function(iter, res, par) {...
2017 Dec 15
8
Register Allocation Graph Coloring algorithm and Others
...estions, please give me some hint, thanks a lot! * IRA is regional register allocator performing graph coloring on a top-down traversal of nested regions, is it Global? compares with Local LRA * The papers by Briggs and Chaiten contradict[2] themselves when examine the text of the paper vs. the pseudocode provided? * Why  interference graph is expensive to build[3]? And I am practicing[4] to use HEA, developed by Dr. Rhydian Lewis, for LLVM firstly. [1] https://reviews.llvm.org/D39712 [2] http://lists.llvm.org/pipermail/llvm-dev/2008-March/012940.html [3] https://github.com/joaotavio/llvm-re...
2017 Jun 26
3
Jagged ROC curves?
...t roc curves seem to have many incremental changes (in x and y directions), but my plot only has 4 or 5 steps even though there are 22 data points. Should I be doing something differently? How can I provide a URL/attachment for my plot? Not sure if I can provide reproducible code, but here is some pseudocode, let me know if you'd like more details: ##### ## generate roc and auc values ##### library(pROC) library(AUCRF) getROC <- function(d1train,d1test){ my_model <- AUCRF(formula= status ~ ., data=d1train, ranking='MDA',ntree=1000,pdel=0.05) my_opt_model <- my_model$RFopt m...
2004 May 11
1
[LLVMdev] Follow-up on: Dynamic updates of current executed code
...Problem is though, that the Ruby compiler is integrated in the compilation of the program being executed, to be able to parse & compile dynamic code at run-time. Therefore the calls to ExecutionEngine::getPointerToGlobal(F) need to be made in LLVM code. Here is a detailed simplistic example in pseudocode of what we want to do: First Ruby code is entered at run-time, received as a string, parsed and compiled into the following code: %-------------- ; External function declare int %printf(sbyte*, ...) ; Custom function int %puts_kernel( sbyte* %string ) { %tmp.0 = call int (sbyte*, ...)* %printf(...