search for: int_

Displaying 20 results from an estimated 28 matches for "int_".

Did you mean: int
2007 Oct 23
2
2-D numerical integration over odd region
Hello all, I'm hoping to find a way to evaluate the following sort of integral in R. \int_a^b \int_{g(y)}^Inf f(x,y) dx dy. The integral has no closed form and so must be evaluated numerically. The "adapt" package provides for multidimensional integration but does not appear to allow the limits of integration to be a function. I need to evaluate a number of integrals of th...
2011 May 18
1
Integral Symbol
Dear All, I am documenting a R package. That means writing the *.Rd files inside the \man folder of the package structure I was wondering how to write the symbol for an integral function in a formula. Similar to this one in LaTeX: \int_{0}^{10} \Omega(t)dt I already tried \deqn{\int_{0}^{10} \Omega(t)dt} but it does not work. Any idea? Which math symbols does R-help recognise? Regards, Javier Hidalgo Carrio [[alternative HTML version deleted]]
2012 Feb 29
2
Converting a function from Splus to R
...ction has the elements "0.d0" and "2.d0". How can I change it to run in R? The function can be found in page 230 from http://www.stat.wisc.edu/~mchung/teaching/stat471/stat_computing.pdf Function is as follows: gauher <- function(n) {# Gauss-Hermite: returns x,w so that #\int_-\infty^\infty exp(-x^2) f(x) dx \doteq \sum w_i f(x_i) EPS <- 3.e-14 PIM4 <- .7511255444649425D0 MAXIT <- 10 m <- trunc((n+1)/2) x <- w <- rep(-1,n) for (i in 1:m) { if (i==1) { z <- sqrt(2*n+1)-1.85575*(2*n+1)^(-.16667) } else if(i==2) { z <- z-1.14*n^.426/z } else if (i==3...
2007 Jan 25
0
distribution overlap - how to quantify?
...uare test or determine the potential mixture components and then compare the respective means and sigmas. But I was rather looking for a simple measure of similarity. Therefore, I used the concept of 'intrinsic discrepancy' which is defined as: \delta{p_{1},p_{2}} = min \left\{ \int_{\chi}p_{1}(x)\log \frac{p_{1}(x)}{p_{2}(x)}dx, \int_{\chi}p_{2}(x)\log\frac{p_{2}(x)}{p_{1}(x)}dx \right\} The smaller the delta the more similar are the distributions (0 when identical). I implemented this in 'R' using an adaptation of the Kullback-Leibler divergence. The function works,...
2010 Jul 21
1
function of an integral
...iable called cip. I have to create another variable called bip that is a function of the former variable cip and also the cumulative distribution function of the variable cip. Consider the equation below: b_{i}\left(c_{i},F,I,p_{0}\right)=c_{i}+\frac{1}{\left[1-F\left(c_{i}\right)\right]^{I-1}}\int_{\overline{c}}^{1}\left[1-F\left(u\right)\right]^{I-1}du In my case, the equation will be: bip=cip+\frac{1}{\left[1-F\left(cip\right)\right]^{4}}\int_{cip}^{2,967}\left[1-F\left(u\right)\right]^{4}du I am facing problem to create this variable bip because of the integral. I am sure I am d...
2008 Sep 26
1
Computing Mean Lifetime from Hazard
Hello, If all I have access to is an empirically calculated hazard function, is it possible to compute an approximate value for the mean lifetime? I know that if the hazard function is essentially constant, the mean lifetime is 1/hazard rate. ?But if I'm confident that the empirical hazard function is not constant, I'm not sure how to go about calculating an estimate of mean lifetime.
2011 Jun 17
0
[LLVMdev] RFC: Integer saturation intrinsics
On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote: > Hi all, > > I'm proposing integer saturation intrinsics. > > def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; > def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; > > The first operand is the integer value being saturated, and second is the saturation bit position. > > For sc...
2011 Jun 17
5
[LLVMdev] RFC: Integer saturation intrinsics
Hi all, I'm proposing integer saturation intrinsics. def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; The first operand is the integer value being saturated, and second is the saturation bit position. For scalar integer types, the...
2010 Apr 27
1
TikzDevice and texi2dvi
...,yi,type='s') lines(range(xi),c(0,0)) lines(xi,yi,type='h') #Add some equations as labels title(main="$p(x)=\\frac{1}{\\sqrt{2\\pi}}e^{-\\frac{x^2}{2}}$") int <- integrate(dnorm,min(xi),max(xi),subdivisions=length(xi)) text(2.8, 0.3, paste("\\small$\\displaystyle\\int_{", min(xi), "}^{", max(xi), "}p(x)dx\\approx", round(int[['value']],3), '$', sep='')) #Close the device dev.off() # Compile the tex file tools::texi2dvi('normal.tex',pdf=T) # optionally view it: # system(paste(getOption('pdfvie...
2018 Nov 05
5
Safe fptoui/fptosi casts
I would be interested in learning what the set of used semantics for float-to-int conversion is. If the only two used are 1) undefined behavior if unrepresentable and 2) saturate to int_{min,max} with NaN going to zero, then I think it makes sense to expose both of those natively in the IR. If the set is much larger, I think separate intrinsics for each behavior would make sense. It would be nice to get rid of the wasm-specific intrinsic for behavior (2) and replace it with a targe...
2011 Jun 17
2
[LLVMdev] RFC: Integer saturation intrinsics
On Jun 17, 2011, at 3:42 PM, Eli Friedman wrote: > On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote: >> Hi all, >> >> I'm proposing integer saturation intrinsics. >> >> def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; >> def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; >> >> The first operand is the integer value being saturated, and second is the saturation bit position. &gt...
2009 Aug 24
0
[LLVMdev] Regular Expression lib support
...stest, quite literally no other parser has got close to the execution speed that this one can parse at for anything like this, and it is easy to write! bool parse_test(std::string &testStr, myPair &ret) { return parse(testStr.begin(),testStr.end(), float_ >> '|' >> int_%',' ret); } And as stated, the spirit version will execute faster, is very easy to write, is very readable, and has adapters so it can stuff into everything from any stl container (or anything that supports insert or push_back for containers) or any generic struct/class (thanks to fusi...
2009 Aug 24
2
[LLVMdev] Regular Expression lib support
On Aug 23, 2009, at 5:50 PM, OvermindDL1 wrote: > On Sun, Aug 23, 2009 at 6:32 PM, Daniel Dunbar<daniel at zuster.org> > wrote: >> This is too heavy, and we don't need the extra features, and regexec >> is well tested and much more standard. Unless there is an >> overwhelming > > 'regexec' I had never heard of, figured it was a library, turns
2011 Feb 02
2
Using MathJax in R's help system
...where \eqn{\mathbf{U}} and \eqn{\mathbf{V}} are < orthogonal, \eqn{\mathbf{V}^\top} means \emph{V transposed}, and < \eqn{\mathbf{D}} is a diagonal matrix with the singular < values \eqn{D_{ii}}{D[i,i]}. Equivalently, \eqn{\mathbf{D} = < \mathbf{U}^\top \mathbf{X V}},\deqn{1 = \int_{\mathbb R}\phi(z)dz} --- > \deqn{ \bold{X = U D V'},} where \eqn{\bold{U}} and \eqn{\bold{V}} are > orthogonal, \eqn{\bold{V'}} means \emph{V transposed}, and > \eqn{\bold{D}} is a diagonal matrix with the singular > values \eqn{D_{ii}}{D[i,i]}. Equivalently, \eqn{\bold...
2008 Oct 01
2
Bivariate normal
Package mvtnorm provides dmvnorm, pmvnorm that can be used to compute Pr(X=x,Y=y) and Pr(X<x,Y<y) for a bivariate normal. Are there functions that would compute Pr(X<x,Y=y)? I'm currently using "integrate" with dmvnorm but it is too slow.
2011 Jun 17
0
[LLVMdev] RFC: Integer saturation intrinsics
...le.com> wrote: > > On Jun 17, 2011, at 3:42 PM, Eli Friedman wrote: > >> On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote: >>> Hi all, >>> >>> I'm proposing integer saturation intrinsics. >>> >>> def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; >>> def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; >>> >>> The first operand is the integer value being saturated, and second is the saturation bit po...
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
...{article} \usepackage{latexsym} \usepackage{amssymb,amsmath,bm} \newcommand{\Prb}{\operatorname{Prob}} \title{Marginal Maximum Likelihood for IRT Models} \author{Harold C. Doran} \begin{document} \maketitle The likelihood function is written as: \begin{equation} \label{eqn:mml} f(x) = \prod^N_{i=1}\int_{\Theta}\prod^K_{j=1}p(x|\theta,\beta)f(\theta)d\theta \end{equation} \noindent where $N$ indexes the total number of individuals, $K$ indexes the total number of items, $p(x|\theta,\beta)$ is the data likelihood and $f(\theta)$ is a population distribution. For the rasch model, the data likelihood...
2013 Mar 01
1
[LLVMdev] NVPTX CUDA_ERROR_NO_BINARY_FOR_GPU
The identifier INT_PTX_SREG_TID_X is the name of an instruction as the back-end sees it, and has very little to do with the name you should use in your IR. Your best bet is to look at the include/llvm/IR/IntrinsicsNVVM.td file and see the definitions for each intrinsic. Then, the name mapping is just: int_foo_bar -...
2016 Jun 07
2
Doubts
...ally just the most common case of the second kind: since it's an operator that doesn't produce any value and has type "void", it can be used to form a root node in the pattern DAG. The third most common kind of root operator is probably void-returning intrinsics (look for "[(int_"). There's also another special operator, "implicit", which is necessary because a pattern for an instruction X should define all registers that X defines, even if the definition isn't something we're matching in the SelectionDAG (that's what makes it implicit). HTH,...
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
Spencer Thanks for your thoughts on this. I did a bit of work and did end up with a method (more a trick), but it did work. I am certain there are better ways to do this, but here is how I resolved the issue. The integral I need to evaluate is \begin{equation} \frac{\int_c^{\infty} p(x|\theta)f(\theta)d\theta} {\int_{-\infty}^{\infty} p(x|\theta)f(\theta)d\theta} \end{equation} Where p(x|\theta) is the likelihood for the Rasch item response theory model and f(\theta) is the population distribution. Originally, I was using numerical quadrature by summing from -10...