similar to: nested "for" loops

Displaying 20 results from an estimated 2000 matches similar to: "nested "for" loops"

2004 Sep 18
4
wxruby-swig problem: MDIChildFrame::Maximize
I just grabbed the latest wxruby-swig from cvs and tried to compile it (without enabling the SWIG step) on my gentoo Linux box. I get: g++ -c -I/usr/lib/wx/include/gtk2-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -O2 -march=athlon-xp -fPIC -I /usr/lib/ruby/gems/1.8/gems/rake-0.4.8/bin -I /usr/lib/ruby/gems/1.8/gems/rake-0.4.8/lib -I
2007 Oct 17
3
Multi-objective optimization
Dear All, Is there any package to do multi-objective optimization? For instance, consider the following problem: maximize f(x,y) in order to x and maximize g(x,y) in order to y, simultaneously, with x and y being the same both for f and g. Can R do it numerically? Thanks in advance, Paul
2008 Dec 09
2
Need help optimizing/vectorizing nested loops
Hi, I'm analyzing a large number of large simulation datasets, and I've isolated one of the bottlenecks. Any help in speeding it up would be appreciated. `dat` is a dataframe of samples from a regular grid. The first two columns are the spatial coordinates of the samples, the remaining 20 columns are the abundances of species in each cell. I need to calculate the species richness in
2010 Apr 23
3
reordering of matrix rows to maximize the sum of the diagonal
Hi r-help community, This question isn't so much a syntax/coding one, but here goes: Let's say I have matrix of arbitrary dimensions and I'd like to reorder the rows in such a way that I could maximize the sum of the entries along the diagonal. For example, for this 3x3 matrix: [,1] [,2] [,3] [1,] 3 4 13 [2,] 9 1 2 [3,] 2 11 1 rearranging the rows
2010 Oct 01
3
maximum likelihood problem
I am trying to figure out how to run maximum likelihood in R. Here is my situation: I have the following equation: equation<-(1/LR-(exp(-k*T)*LM)*(1-exp(-k))) LR, T, and LM are vectors of data. I want to R to change the value of k to maximize the value of equation. My attempts at optim and optimize have been unsuccessful. Are these the recommended functions that I should use to maximize
2017 May 30
8
Enable vectorizer-maximize-bandwidth by default?
On Fri, May 19, 2017 at 4:01 PM Adam Nemet via llvm-dev < llvm-dev at lists.llvm.org> wrote: > I will run it on Cyclone/AArch64 next week. > FYI, we're still waiting on these Adam... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170530/7cb390ca/attachment.html>
2012 Apr 05
4
Appropriate method for sharing data across functions
In trying to streamline various optimization functions, I would like to have a scratch pad of working data that is shared across a number of functions. These can be called from different levels within some wrapper functions for maximum likelihood and other such computations. I'm sure there are other applications that could benefit from this. Below are two approaches. One uses the <<-
2017 Jun 12
2
Enable vectorizer-maximize-bandwidth by default?
Guys, Just to clarify that with the current fix in SLM there is no need to wait for other issues to be fixed (minor issue). So you can move on with your patch. From: Agabaria, Mohammed Sent: Wednesday, June 07, 2017 15:24 To: Zaks, Ayal <ayal.zaks at intel.com>; Chandler Carruth <chandlerc at gmail.com>; Flamedoge <code.kchoi at gmail.com>; Dehao Chen <dehao at google.com>
2017 May 30
5
Enable vectorizer-maximize-bandwidth by default?
On Tue, May 30, 2017 at 1:40 AM Agabaria, Mohammed via llvm-dev < llvm-dev at lists.llvm.org> wrote: > We’re seeing nice improvements but also significant degradations on IA, > which we would like to investigate before the patch is committed. > > > > Major degradations we see: > > > > networking > > ip_pktcheckb1m -6.80 % > >
2004 Sep 02
1
trivial question about nested loops
Hello, It's a trivial question but I haven't found a solution in the full reference manual. How can I make the code below run? Would an array/matrix solution be faster? Please provide a short example, if possible. Thanks in advance, dan for (k in 1:5) assign(paste("f",k,sep=""),vector(mode="complex",5)) for (k in 1:5) { for(j in 1:5) f[k][[j]] <-
2010 Mar 24
1
flexible alternative to subsetting dataframe inside nested loops
I have a dataFrame variable: L1 L2 L3 ... v1 v2 ... 1 2 3 4 ... I want to process subsets of it as defined by combinations of L1-L2-L3. I do it successfully using nested loops: for (i in valuesOfL1 { for (j in valuesOfL2) { for (k in valuesOfL3) { tempData <- subset(dataFrame, (L1 == i & L2 == j & L3 == k, select=c(v1,v2) )) if
2010 Nov 24
1
diverting output from nested loops
Dear List, I have a series of nested loops with the structure shown below, and I am struggling to figure out how to divert output to folders created with dir.create() within the loops. What I need is for the output to end up as topNameK/subNameL/objNameM.pdf; what I get instead is a series of directories topNameK/, directories subNameL/, and files objNameM.pdf, all in the working directory. Any
2003 Jul 17
3
Looking to maximize a conditional likelihood
I want to maximize a conditional likelihood function that is basically logistic conditional on the number of successes within strata. What would be a good starting place for this? A complication is that the denominator includes a term that is the sum over all permutations. Although there is no time dimension to the problem, it's possible a degenerate use of the Cox proportional hazards
2016 Jan 04
2
Fwd: Strength reduction in loops
Here is a simple loop: long foo(int len, long* s) { long sum = 0; for (int i=0; i<len; i++) sum += s[i*12]; return sum; } There is a multiplication in each loop iteration. Can this be turned into addition, and is there already a pass that does? (https://en.wikipedia.org/wiki/Strength_reduction uses this very situation as an example in the opening paragraph: "In
2008 Aug 09
1
Converting nested "for" loops to an "apply" function(s)
Hello, I would like to know more about how to use the "apply" family and have attempted to convert nested "for" loops in example code from Contributed Documentation ("The Friendly Beginners' R Course? by Toby Marthews (ZIP, 2007-03-01)") to an "apply" function(s). The relevant code is: distances=c(51,65,175,196,197,125,10,56) #distances of 8 houses
2013 Feb 23
1
Issue with matrices within nested for-loops
Greetings! I am trying to compare simulated environmental conditions from a model against a recruitment time series for a species of crab by first dropping 5 data points, and then using the remainder to attempt to simulate the missing data as a measure of best fit and using the following code: all.mat<-as.matrix(comb,ncol=ncol(comb),nrow=nrow(comb)) obs<-as.matrix(R2,24,1) mod<-all.mat
2008 May 19
2
Help on nested FOR loops
I am new to more radical programming in R. I am trying to write a nested 'for' loop to produce output that takes subscripts like: for i taking values 1,2,3,4,5 and j taking values 1,2,3 I want to output for a computation using the combination values of i and j a value x like this; i j x 1 1 x11 1 2 x12 1 3 x13 2 1 x21 2 2 x22 2 3 x23 3 1 x31 3 2 x32
2005 Sep 29
7
need help on multiple isp routing
i''ve read your http://lartc.org/howto/lartc.rpdb.multiple-links.html article as well as Advanced IP Routing (esp. chapter 10.4) and still unable to make this thing work. am i that helpless? :) is there anyone to guide me through the multiple ISP setup? into details. i got 2 dsl connections from different ISPs (A and B), both connections use PPPoE, both got assigned with dynamic IPs
2008 Jul 01
2
how to automatically maximize the graph window (under XP) ?
Hello, I'm trying to produce graphs automatically from data stored in database. Before saving the graphs, I would like to maximize the size of the graphs. The best would be to directly open maximized windows with x11() but up to now I failed doing it. I tried different widths and heighs but I never managed to obtain a full screen window. Is there a command to do it ? Thanks in advance, Ptit
2010 Oct 29
2
what´s wrong with this code?
Hello, I want to maximize a likelihood function expressed as an integral that can not be symbolically evaluated. I expose my problem in a reduced form. g<- function(x){ integrand<-function(y) {exp(-x^2)*y} g<-integrate(integrand,0,1) } h<-function(x) log((g(x))) g is an object of the class function, but g(2) is a integrate object, I can print(g(2))