SCM

SCM Repository

[matrix] Annotation of /pkg/man/pMatrix-class.Rd
ViewVC logotype

Annotation of /pkg/man/pMatrix-class.Rd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 650 - (view) (download) (as text)

1 : bates 638 \name{pMatrix-class}
2 :     \docType{class}
3 :     \alias{pMatrix-class}
4 :     \alias{\%*\%,matrix,pMatrix-method}
5 :     \alias{\%*\%,pMatrix,matrix-method}
6 :     \alias{coerce,integer,pMatrix-method}
7 :     \alias{coerce,pMatrix,matrix-method}
8 :     \alias{solve,pMatrix,missing-method}
9 :     \alias{t,pMatrix-method}
10 :     \title{Permutation matrices}
11 :     \description{The \code{"pMatrix"} class is the class of permutation
12 :     matrices stored as 1-based integer permutation vectors.}
13 :     \section{Objects from the Class}{
14 :     Objects can be created by calls of the form \code{new("pMatrix", ...)}
15 :     or by coercion from an integer permutation vector.
16 :     }
17 :     \section{Slots}{
18 :     \describe{
19 :     \item{\code{perm}:}{An integer, 1-based permutation vector, i.e.
20 :     an integer vector of length \code{Dim[1]} whose elements form a
21 :     permutation of \code{1:Dim[1]}.}
22 :     \item{\code{Dim}:}{Object of class \code{"integer"}. The dimensions
23 :     of the matrix which must be a two-element vector of equal,
24 :     non-negative integers.}
25 :     \item{\code{Dimnames}:}{list of length two; each component
26 :     containing NULL or a \code{\link{character}} vector length
27 :     equal the corresponding \code{Dim} element.}
28 :     }
29 :     }
30 :     \section{Extends}{
31 :     Class \code{"Matrix"}, directly.
32 :     }
33 :     \section{Methods}{
34 :     \describe{
35 :     \item{\%*\%}{\code{signature(x = "matrix", y = "pMatrix")}: ... }
36 :     \item{\%*\%}{\code{signature(x = "pMatrix", y = "matrix")}: ... }
37 :     \item{coerce}{\code{signature(from = "integer", to = "pMatrix")}: ... }
38 :     \item{coerce}{\code{signature(from = "pMatrix", to = "matrix")}: ... }
39 :     \item{solve}{\code{signature(a = "pMatrix", b = "missing")}: return
40 :     the inverse permutation matrix.}
41 :     \item{t}{\code{signature(x = "pMatrix")}: return the transpose of
42 :     the permuation matrix (which is also the inverse of the
43 :     permutation matrix).}
44 :     }
45 :     }
46 :     %\seealso{}
47 :     \examples{
48 :     (pm1 <- as(as.integer(c(2,3,1)), "pMatrix"))
49 :     t(pm1)
50 :     solve(pm1)
51 : bates 650 pm1 \%*\% as(t(pm1), "matrix") # check that the transpose is the inverse
52 : bates 638 (mm <- round(array(rnorm(3 * 3), c(3, 3)), 2))
53 : bates 650 mm \%*\% pm1
54 :     pm1 \%*\% mm
55 :     try(as(as.integer(c(3,3,1)), "pMatrix"))
56 : bates 638 }
57 :     \keyword{classes}

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge