Skip to content
Prev 201818 / 398502 Next

Symmetric Matrix classes

On Nov 26, 2009, at 9:45 PM, Gad Abraham wrote:

            
Per help
Slots

uplo:A character object indicating if the upper triangle ("U") or the  
lower triangle ("L") is stored. At present only the lower triangle  
form is allowed.

This "works" ( at least to the extent of not producing an error  
message) after addressing a couple of other error messages that were  
helpful.

M <- new("dsyMatrix", uplo="L", x=as.double(1:(100*100)),  
Dim=as.integer(c(100, 100)))

I'm not sure that I would have expected the result, though it makes a  
certain amount of sense after considering the contradictory  
requirements:

 > M <- new("dsyMatrix", uplo="L", x=as.double(1:(10*10)),  
Dim=as.integer(c(10, 10)))
 > M
10 x 10 Matrix of class "dsyMatrix"
       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
  [1,]    1    2    3    4    5    6    7    8    9    10
  [2,]    2   12   13   14   15   16   17   18   19    20
  [3,]    3   13   23   24   25   26   27   28   29    30
  [4,]    4   14   24   34   35   36   37   38   39    40
  [5,]    5   15   25   35   45   46   47   48   49    50
  [6,]    6   16   26   36   46   56   57   58   59    60
  [7,]    7   17   27   37   47   57   67   68   69    70
  [8,]    8   18   28   38   48   58   68   78   79    80
  [9,]    9   19   29   39   49   59   69   79   89    90
[10,]   10   20   30   40   50   60   70   80   90   100