Displaying 20 results from an estimated 1000 matches similar to: "can't integrate in loop"
2012 Nov 30
3
loop function and integrate?
Hi guys!
I have to compute something and i don't know what i'm doing wrong. my code
is a bit complex, but imagine that is something like this:
a = c(1,2,3,4)
ia = length(a)
x = seq(1,100,length=0.1)
ib = length(x)
int1 = numeric(ib)
b = numeric(ib)
for(j in 1:ia) {
H = function(x) {sin(x + a[j])}
for(i in 1:ib) {
int = integrate(H, lower = 0, upper
2008 Dec 18
1
Indicator function for merged times (was: Re: Rr: For and if confusion)
Please start a new thread for a new topic and use a
meaningful subject for sake of the archives and
everyone trying to follow.
Using your Int1, correcting your Int2 and using your
Y (which goes to Jul not Aug as per the comment):
library(zoo)
> as.ts(with(merge.zoo(Int1, Int2, Y, fill = 0), pmax(Int1, Int2)))
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1992
2009 Jun 05
2
[LLVMdev] Int1 to Double Type Conversion
Hello,
I would like to know if there is an instruction to convert values from the
Int1 type to the Double type in LLVM. I would like to achieve the equivalent
of casting a bool value to a double value in C++. Doing the simple
CreateSIToFP or CreateUIToFP does not work, it throws an assertion ("invalid
cast"). I simply want to avoid branching it's not necessary. What's the
2011 Sep 06
2
[LLVMdev] bitwise AND
Hi,
I want to compute the bitwise 'and' between two values of type int1: %x = and %a, %b .
Which is the LLVM instruction that creates this? I only found the APInt class, whose constructor is:
APInt(unsigned numBits, uint64_t val, bool isSigned = false)
and which provides the bitwise AND operation:
APInt llvm::APIntOps::And (const APInt &LHS, const APInt &RHS)
Bitwise
2012 Nov 26
1
error in plot(table(c('a','a')))
Hi all,
there appears to be something strange with the plotting of tables of 1
dimension; if I attempt to make a plot of a table of characters with only
1 value I get an error (Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ). With more than one value I don't get
errors, neither with integers (even if only 1 value):
tbl.char1 <-
2012 Nov 26
1
error in plot(table(c('a','a')))
Hi all,
there appears to be something strange with the plotting of tables of 1
dimension; if I attempt to make a plot of a table of characters with only
1 value I get an error (Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ). With more than one value I don't get
errors, neither with integers (even if only 1 value):
tbl.char1 <-
2020 Jul 02
3
Redundant ptrtoint/inttoptr instructions
Hi all,
We noticed a lot of unnecessary ptrtoint instructions that stand in way of
some of our optimizations; the code pattern looks like this:
bb1:
%int1 = ptrtoint %struct.s* %ptr1 to i64
bb2:
%int2 = ptrtoint %struct.s* %ptr2 to i64
%bb3:
%phi.node = phi i64 [ %int1, %bb1 ], [%int2, %bb2 ]
%ptr = inttoptr i64 %phi.node to %struct.s*
In short, the pattern above arises due to:
1.
2007 Jan 28
1
NAT: RTP Path Optimization
http://lisas.de/~patrick/temp/rtp-optimierung.png
Everything is working fine in my Setup, but I want Extern1 to talk to
Extern2 directly whitout going over Asterisk as the uplink is slow.
When I set for Extern1/2
canreinvite=yes
it works, but "Intern-2-Extern" doesn't work because Asteisk gives out
the private IP-Adresses of Int1/2
I defined
localnet=10.0.0.0/255.0.0.0 (Private
2003 Sep 02
3
How to avoid automatic coercion to factor?
I have a function that manipulates a list of numeric and character
components of equal length and wants to return a data.frame.
EG,
f<-function() {
a<-list(Int1=1:5,Char1=letters[1:5],Char2=letters[6:10])
b<-data.frame(a)
}
How can I get the columns Char1, Char2, (...CharN) returned coerced to
character and not factor?
It appears that I could coerce individual columns by
2009 Jun 05
0
[LLVMdev] Int1 to Double Type Conversion
On Fri, Jun 5, 2009 at 2:15 PM, Nyx<mcheva at cs.mcgill.ca> wrote:
>
> Hello,
>
> I would like to know if there is an instruction to convert values from the
> Int1 type to the Double type in LLVM. I would like to achieve the equivalent
> of casting a bool value to a double value in C++. Doing the simple
> CreateSIToFP or CreateUIToFP does not work, it throws an assertion
2005 Jan 18
4
Data Simulation in R
Dear List:
A few weeks ago I posted some questions regarding data simulation and
received some very helpful comments, thank you. I have modified my code
accordingly and have made some progress.
However, I now am facing a new challenge along similar lines. I am
attempting to simulate 250 datasets and then run the data through a
linear model. I use rm() and gc() as I move along to clean up the
2015 Apr 28
2
[LLVMdev] Lowering intrinsic that return an int1
Hi all,
I'm playing with intrinsics and I was wondering how to lower an
intrinsic that should return, for example, an int1? More precisely, how
to return the value when working with MachineInst?
First, I have defined an instrinsic in "Intrinsics.td":
_def int_antivm : Intrinsic<[llvm_i1_ty], [], [], "llvm.antivm">;_
Then I want to lower it in the X86 backend,
2020 Jul 02
3
Redundant ptrtoint/inttoptr instructions
My general feeling is this: No optimizations should be creating
int2ptr/ptr2int. We really need to fix them all. They should use pointer
casts and i8* GEPs. This has, unfortunately, been a problem for a long
time. As Johannes says, optimizing int2ptr/ptr2int is very tricky. In
part, becaue all dependencies, including implicit control dependencies,
end up being part of the resulting aliasing
2011 Jun 05
1
conditions simpler way
Dear All,
I have a MCMC result in x1. I was wondering if there is a simpler, more
elegant way of evaluating the estimate of an integral then this (I am
pretty sure there is):
Also if I want to count the x's say -1<x<2 but not the ones in the burn
in period.
[code]
z <- -2
burnin <- 2000
int1 <-
2012 Mar 25
1
cubature
Hi,
I am using adaptIntegrate from Cubature to do numerical integration on a
double integral with a 1 x 2 vector x.
Say the function is something simple to start like f(x)=x1*x2 and I wish to
integrate x1 over (0,365-x2) and x2 over (0,365)
f <- function(x) {(x[2])*(x[1])} # "x" is vector
int1<-adaptIntegrate(f, lowerLimit = c(0, 0), upperLimit = c(365-x[2], 365))
I recieve
2005 Aug 09
4
Too slow computer?
Hello! I''ve put some questions on this list some weeks
ago and I''ve got good answers. Thank you!
Now I''ve finished my (beautyful) script and I ran it
on my router...
About my script:
It routes packages based on their destination on the
Internet. I have about 1650 preffered destination
networks listed in some file. The script read this
file and marks every package for
2006 Oct 30
4
read.fwf and header
Hi!
I have data (also in attached file) in the following form:
num1 num2 num3 int1 fac1 fac2 cha1 cha2 Date POSIXt
1 1 f q 1900-01-01 1900-01-01 01:01:01
2 1.0 1316666.5 2 a g r z 1900-01-01 01:01:01
3 1.5 1188830.5 3 b h s y 1900-01-01 1900-01-01 01:01:01
4 2.0 1271846.3 4 c i t x 1900-01-01 1900-01-01 01:01:01
5 2.5 829737.4 d j u w 1900-01-01
6 3.0
2006 Oct 30
4
read.fwf and header
Hi!
I have data (also in attached file) in the following form:
num1 num2 num3 int1 fac1 fac2 cha1 cha2 Date POSIXt
1 1 f q 1900-01-01 1900-01-01 01:01:01
2 1.0 1316666.5 2 a g r z 1900-01-01 01:01:01
3 1.5 1188830.5 3 b h s y 1900-01-01 1900-01-01 01:01:01
4 2.0 1271846.3 4 c i t x 1900-01-01 1900-01-01 01:01:01
5 2.5 829737.4 d j u w 1900-01-01
6 3.0
2009 Feb 12
2
[LLVMdev] Eliminate PHI for non-copyable registers
Chris Lattner-2 wrote:
>
>
> On Feb 11, 2009, at 4:07 AM, Alex wrote:
>
>> In my hardware there are two special registers cannot be copied but
>> can only be assigned and referenced (read) in the other instruction.
>> They are allocatable also.
>>
>> br i1 %if_cond, label %then, label %else
>> then:
>> %x1 = fptosi float %y1 to i32
2024 Jun 13
1
Integration of functions with a vector argument
? Wed, 12 Jun 2024 23:42:18 +0000
"Levine, Michael" <mlevins at purdue.edu> ?????:
> f.int1 <- function(x,y) {Vectorize (function(y) f(c(x,y),H=H,j=j))}
Vectorize returns a callable function(y), so wrapping it in a
function(x,y) will not work. Since you'd like to integrate over y, we
can perform the same transformation manually using vapply:
# A version of f(...) that