-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrcppeigen_hello_world.Rd
50 lines (45 loc) · 1.32 KB
/
rcppeigen_hello_world.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
\name{RcppEigen-Functions}
\alias{rcppeigen_hello_world}
\alias{rcppeigen_innerproduct}
\alias{rcppeigen_outerproduct}
\alias{rcppeigen_bothproducts}
\title{Set of functions in example RcppEigen package}
\description{
These four functions are created when
\code{RcppEigen.package.skeleton()} is invoked to create a
skeleton packages.
}
\usage{
rcppeigen_hello_world()
rcppeigen_outerproduct(x)
rcppeigen_innerproduct(x)
rcppeigen_bothproducts(x)
}
\arguments{
\item{x}{a numeric vector}
}
\value{
\code{rcppeigen_hello_world()} does not return a value, but displays a
message to the console.
\code{rcppeigen_outerproduct()} returns a numeric matrix computed as the
outer (vector) product of \code{x}.
\code{rcppeigen_innerproduct()} returns a double computer as the inner
(vector) product of \code{x}.
\code{rcppeigen_bothproducts()} returns a list with both the outer and
inner products.
}
\details{
These are example functions which should be largely
self-explanatory. Their main benefit is to demonstrate how to write a
function using the Eigen C++ classes, and to have to such a
function accessible from R.
}
\references{
See the documentation for Eigen, and RcppEigen, for more details.
}
\examples{
x <- sqrt(1:4)
rcppeigen_innerproduct(x)
rcppeigen_outerproduct(x)
}
\author{Dirk Eddelbuettel}