# search for: lowerbound

Displaying 20 results from an estimated 23 matches for "lowerbound".

2012 Feb 27
3
[LLVMdev] How to unroll loop with non-constant boundary
Dear LLVM, Consider two loops with one interation - First with constant lower bound, second with usual non-constant lower bound: int main(int argc, char ** argv) { int numOfIterations= 1; int stride=1; int lowerBound = 1000; - 1st | int lowerBound = argc; - 2nd int upperBound = lowerBound + (numOfIterations - 1)*stride; int i = lowerBound; int s = 0; while(i <= upperBound) { s += i; i++; } return s; } After the application...
2012 Feb 27
2
[LLVMdev] How to unroll loop with non-constant boundary
...;     Consider two loops with one interation - >>     First with constant lower bound, second with usual non-constant lower bound: >> >>     int main(int argc, char ** argv) >>     { >>         int numOfIterations= 1; >>         int stride=1; >>         int lowerBound = 1000; - 1st | int lowerBound = argc; - 2nd >>         int upperBound = lowerBound + (numOfIterations - 1)*stride; >> >>         int i = lowerBound; >> >>         int s = 0; >>         while(i <= upperBound) >>         { >>            s += i; >...
2012 Feb 27
0
[LLVMdev] How to unroll loop with non-constant boundary
...Dear LLVM, > > Consider two loops with one interation - > First with constant lower bound, second with usual non-constant lower bound: > > int main(int argc, char ** argv) > { > int numOfIterations= 1; > int stride=1; > int lowerBound = 1000; - 1st | int lowerBound = argc; - 2nd > int upperBound = lowerBound + (numOfIterations - 1)*stride; > > int i = lowerBound; > > int s = 0; > while(i <= upperBound) > { > s += i; > i++; >...
2012 Feb 27
0
[LLVMdev] How to unroll loop with non-constant boundary
...one interation - >>> First with constant lower bound, second with usual non-constant lower bound: >>> >>> int main(int argc, char ** argv) >>> { >>> int numOfIterations= 1; >>> int stride=1; >>> int lowerBound = 1000; - 1st | int lowerBound = argc; - 2nd >>> int upperBound = lowerBound + (numOfIterations - 1)*stride; >>> >>> int i = lowerBound; >>> >>> int s = 0; >>> while(i <= upperBound) >>> { &g...
2018 May 03
4
...to do that in optim. Mo.vect <- as.vector(tail(head(mo,i),1)) wgt.vect <- as.vector(tail(head(moWeightsMax,i),1)) cov.mat <- cov(tail(head(morets,i+12),12)) opt.fun <- function(wgt.vect) -sum(Mo.vect %*% wgt.vect) / (t(wgt.vect) %*% (cov.mat %*% wgt.vect)) LowerBounds<-c(0.2,0.05,0.1,0,0,0) UpperBounds<-c(0.6,0.3,0.6,0.15,0.1,0.2) OptimSolution<-optim(wgt.vect, fn=opt.fun, method="L-BFGS-B",lower=LowerBounds,upper=UpperBounds) Any thoughts are appreciated! Mike Michael Ashton, CFA Managing Principal Enduring Investments LLC W:...
2012 May 01
0
Optim (fct): Parameters=LowerBounds
...at can as easily cut your arm off as saw a log. JN On 05/01/2012 06:00 AM, r-help-request at r-project.org wrote: > Message: 54 Date: Mon, 30 Apr 2012 08:30:24 -0700 (PDT) From: barb <mainzel89 at hotmail.com> > To: r-help at r-project.org Subject: [R] Optim (fct): Parameters=LowerBounds!? Message-ID: > <1335799824557-4598504.post at n4.nabble.com> Content-Type: text/plain; charset=UTF-8 Hey, i > am trying to do the MLE for Garch and have a problem with the optim function. Initally i > tried optim with Method=BFGS. Reading trhough the forum i found out i would n...
2012 Nov 26
2
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
...≥ 0 (unless constant) │ │ Cmp2: Size ≥ Offset ┆ ┆ Cmp3: ObjSize ≥ NeededSize I am looking at generating IR like this: %upperbound = getelementptr inbounds i64* %memobj, i64 %elements %end = getelementptr inbounds i64* %ptr, i64 1 %ilowerbound = ptrtoint i64* %memobj to i64 %iupperbound = ptrtoint i64* %upperbound to i64 %iptr = ptrtoint i64* %ptr to i64 %iend = ptrtoint i64* %end to i64 %cmpl = icmp ult %iptr, %ilowerbound %cmpu = icmp ult %iupperbound, %iend %9 = or i1 %cmpl, %cmpu br i1 %11, label %trap, label %12...
2012 Nov 26
0
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
...ssable (e.g., a char buffer) - ptr points to the last few bytes of the address space (with a large offset, but starting in bounds) - the information read/written is large and therefore there's an overflow in the memory addresses that are accessed. In this case, you'll have ptr > lowerbound and end < upperbound. The bad part is that end < ptr. I thought a bit on the subject and I couldn't find any solution with just 2 branches. The exception I found is if the size of an allocated object is always smaller than half of the address space (which seems a reasonable assumptio...
2018 May 03
0
...Mo.vect <- as.vector(tail(head(mo,i),1)) > wgt.vect <- as.vector(tail(head(moWeightsMax,i),1)) > cov.mat <- cov(tail(head(morets,i+12),12)) > opt.fun <- function(wgt.vect) -sum(Mo.vect %*% wgt.vect) / (t(wgt.vect) %*% (cov.mat %*% wgt.vect)) > > LowerBounds<-c(0.2,0.05,0.1,0,0,0) > UpperBounds<-c(0.6,0.3,0.6,0.15,0.1,0.2) > > OptimSolution<-optim(wgt.vect, fn=opt.fun, method="L-BFGS-B",lower=LowerBounds,upper=UpperBounds) > > > Any thoughts are appreciated! > > Mike > > Michael Ashton, CFA &g...
2018 May 03
2
...as.vector(tail(head(mo,i),1)) >> wgt.vect <- as.vector(tail(head(moWeightsMax,i),1)) >> cov.mat <- cov(tail(head(morets,i+12),12)) >> opt.fun <- function(wgt.vect) -sum(Mo.vect %*% wgt.vect) / (t(wgt.vect) %*% (cov.mat %*% wgt.vect)) >> >> LowerBounds<-c(0.2,0.05,0.1,0,0,0) >> UpperBounds<-c(0.6,0.3,0.6,0.15,0.1,0.2) >> >> OptimSolution<-optim(wgt.vect, fn=opt.fun, method="L-BFGS-B",lower=LowerBounds,upper=UpperBounds) >> >> >> Any thoughts are appreciated! >> >> Mik...
2012 Dec 04
2
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
...er) > - ptr points to the last few bytes of the address space (with a large > offset, but starting in bounds) > - the information read/written is large and therefore there's an > overflow in the memory addresses that are accessed. > > In this case, you'll have ptr > lowerbound and end < upperbound. The bad > part is that end < ptr. > > > I thought a bit on the subject and I couldn't find any solution with > just 2 branches. > The exception I found is if the size of an allocated object is always > smaller than half of the address space (whic...
2018 Nov 01
4
Fwd: RFC: Adding debug information to LLVM to support Fortran
...ed array, that has indices from 1 to 10 for the rows and 2 to 11 for the columns. TYPE(t) :: array(10,2:11) For this declaration, the compiler generates the following LLVM metadata. !100 = !DIFortranArrayType(baseType: !7, elements: !101) !101 = !{ !102, !103 } !102 = !DIFortranSubrange(constLowerBound: 1, constUpperBound: 10) !103 = !DIFortranSubrange(constLowerBound: 2, constUpperBound: 11) The DWARF generated for this is as follows. (DWARF asserts in the standard that arrays are interpreted as column-major.) DW_TAG_array_type: DW_AT_name: array DW_AT_type...
2018 May 04
0
...(mo,i),1)) >>> wgt.vect <- as.vector(tail(head(moWeightsMax,i),1)) >>> cov.mat <- cov(tail(head(morets,i+12),12)) >>> opt.fun <- function(wgt.vect) -sum(Mo.vect %*% wgt.vect) / (t(wgt.vect) %*% (cov.mat %*% wgt.vect)) >>> >>> LowerBounds<-c(0.2,0.05,0.1,0,0,0) >>> UpperBounds<-c(0.6,0.3,0.6,0.15,0.1,0.2) >>> >>> OptimSolution<-optim(wgt.vect, fn=opt.fun, method="L-BFGS-B",lower=LowerBounds,upper=UpperBounds) >>> >>> >>> Any thoughts are appreciated! &...
2018 May 06
1
...wgt.vect <- as.vector(tail(head(moWeightsMax,i),1)) > >>> cov.mat <- cov(tail(head(morets,i+12),12)) > >>> opt.fun <- function(wgt.vect) -sum(Mo.vect %*% wgt.vect) / > (t(wgt.vect) %*% (cov.mat %*% wgt.vect)) > >>> > >>> LowerBounds<-c(0.2,0.05,0.1,0,0,0) > >>> UpperBounds<-c(0.6,0.3,0.6,0.15,0.1,0.2) > >>> > >>> OptimSolution<-optim(wgt.vect, fn=opt.fun, method="L-BFGS-B",lower= > LowerBounds,upper=UpperBounds) > >>> > >>> > >>...
2018 May 05
1
Hi, You can use the projectLinear argument in BB::spg to optimize with linear equality/inequality constraints. Here is how you implement the constraint that all parameters sum to 1. require(BB) spg(par=p0, fn=myFn, project="projectLinear", projectArgs=list(A=matrix(1, 1, length(p0)), b=1, meq=1)) Hope this is helpful, Ravi [[alternative HTML version deleted]]
2018 Jan 04
0
RFC: Extending DISubrange count field
...s as an RFC with llvm-dev. The proposed change is to extend the 'count' field to also accept a Metadata node, rather than only accepting a signed integer. For example: !10 = !DILocalVariable(name: "count", scope: !8, file: !6, line: 42, type: !9) !11 = !DISubrange(count !10, lowerBound: 0) ^^^ references the local variable This allows specifying the size of an array by referencing the DIE of a local variable that holds the size expression. Another reason to extend the count field is to specify the length with a DIExpression. For instance, we need this t...
2012 Dec 04
0
[LLVMdev] RFC: change BoundsChecking.cpp to use address-based tests
Hi, > Could you provide a bit of background of the expected domains of Size and > Offset? In particular, are they signed or unsigned integers? A > non-negative size doesn't seem to make much sense in this context, but > depending on how it's calculated I could see it arising. Is a zero Size > something that might arise here? I'm assuming the Offset comes from an
2018 Nov 01
2
RFC: Adding debug information to LLVM to support Fortran
...enerates the following LLVM metadata. !100 = !DIFortranArrayType(baseType: !7, elements: !101) Since the DI* hierarchy really just is the DWARF type hierarchy, I don't think we will need to introduce any fortran-specific names for arrays. !101 = !{ !102, !103 } !102 = !DIFortranSubrange(constLowerBound: 1, constUpperBound: 10) !103 = !DIFortranSubrange(constLowerBound: 2, constUpperBound: 11) The DWARF generated for this is as follows. (DWARF asserts in the standard that arrays are interpreted as column-major.) DW_TAG_array_type: DW_AT_name: array DW_AT_type: 4d08...
2016 Apr 09
0
[FORGED] Generating random data with non-linear correlation between two variables
...p between on data set is linear whereas non-linear (e.g., polynomial) with another. However, the distributions of the v1 and v2 should not be other than normal or slightly positively skewed or slightly negatively skewed. In Oracle, random data is generated with packaged function dbms_random.value(lowerbound, upperbound), which can be called from SQL query with where clause (level <= no_of_rows) for the number of rows you want. After the rows are generated, we can write custom functions to spread the data points along the y-axis, so that they wouldn't overlap. I hope this may clear the use ca...
2016 Apr 09
1
[FORGED] Generating random data with non-linear correlation between two variables
...on data set is linear whereas non-linear (e.g., polynomial) with another. However, the distributions of the v1 and v2 should not be other than normal or slightly positively skewed or slightly negatively skewed. > > In Oracle, random data is generated with packaged function dbms_random.value(lowerbound, upperbound), which can be called from SQL query with where clause (level <= no_of_rows) for the number of rows you want. > > After the rows are generated, we can write custom functions to spread the data points along the y-axis, so that they wouldn't overlap. > > I hope this...