tests/testthat/_snaps/spd-matrices.md

SPDMatrices method cholesky_factor() works

Code
  spd3$cholesky_factor(A)
Output
            [,1]     [,2]     [,3]
  [1,] 1.2247449 0.000000 0.000000
  [2,] 0.4082483 1.154701 0.000000
  [3,] 0.0000000 0.000000 1.732051

SPDMatrices method differential_cholesky_factor() works

Code
  spd3$differential_cholesky_factor(Id, A)
Output
             [,1]      [,2]      [,3]
  [1,]  0.4082483 0.0000000 0.0000000
  [2,] -0.1360828 0.4811252 0.0000000
  [3,]  0.0000000 0.0000000 0.2886751

SPDMatrices method differential_exp() works

Code
  spd3$differential_exp(Id, A)
Output
           [,1]     [,2]     [,3]
  [1,] 5.053669 2.335387  0.00000
  [2,] 2.335387 5.053669  0.00000
  [3,] 0.000000 0.000000 20.08554

SPDMatrices method inverse_differential_exp() works

Code
  spd3$inverse_differential_exp(Id, A)
Output
             [,1]       [,2]       [,3]
  [1,]  0.2516074 -0.1162721 0.00000000
  [2,] -0.1162721  0.2516074 0.00000000
  [3,]  0.0000000  0.0000000 0.04978707

SPDMatrices method differential_log() works

Code
  spd3$differential_log(Id, A)
Output
        [,1]  [,2]      [,3]
  [1,]  0.75 -0.25 0.0000000
  [2,] -0.25  0.75 0.0000000
  [3,]  0.00  0.00 0.3333333

SPDMatrices method inverse_differential_log() works

Code
  spd3$inverse_differential_log(Id, A)
Output
       [,1] [,2] [,3]
  [1,]  1.5  0.5    0
  [2,]  0.5  1.5    0
  [3,]  0.0  0.0    3

SPDMatrices method differential_power() works

Code
  spd3$differential_power(2, Id, A)
Output
       [,1] [,2] [,3]
  [1,]    3    1    0
  [2,]    1    3    0
  [3,]    0    0    6

SPDMatrices method inverse_differential_power() works

Code
  spd3$inverse_differential_power(2, Id, A)
Output
         [,1]   [,2]      [,3]
  [1,]  0.375 -0.125 0.0000000
  [2,] -0.125  0.375 0.0000000
  [3,]  0.000  0.000 0.1666667

SPDMatrices method random_tangent_vec() works

Code
  spd3$random_tangent_vec(Id, 10)
Output
  , , 1

              [,1]        [,2]       [,3]
   [1,] -1.2339222  0.81493471 -0.5716160
   [2,]  1.5037305  0.08256041  0.1243826
   [3,]  1.0913065  0.99607474  0.5960522
   [4,]  1.1549206  0.37192702 -0.5762690
   [5,] -1.1248316  1.66836718 -1.0210079
   [6,]  0.1332407 -1.25401498  0.3372536
   [7,]  0.4697668  1.80840871  0.1515502
   [8,] -1.2172993 -0.33206828 -1.6534908
   [9,] -0.1134699  0.01418402 -1.5291458
  [10,]  0.4485960  1.24839128  0.9134873

  , , 2

               [,1]        [,2]       [,3]
   [1,]  0.81493471  1.11990323  0.1489296
   [2,]  0.08256041  0.85080811 -0.2533322
   [3,]  0.99607474 -1.69847503  0.0404043
   [4,]  0.37192702 -0.25530630  1.0128172
   [5,]  1.66836718 -1.76076311 -0.2816639
   [6,] -1.25401498  0.01186733 -0.6443221
   [7,]  1.80840871  1.83520705  0.8337617
   [8,] -0.33206828  1.92801897 -0.2750685
   [9,]  0.01418402 -0.33298585 -0.3270133
  [10,]  1.24839128 -1.40066514  0.7595784

  , , 3

              [,1]       [,2]        [,3]
   [1,] -0.5716160  0.1489296  1.83255741
   [2,]  0.1243826 -0.2533322 -1.94492620
   [3,]  0.5960522  0.0404043 -0.41118969
   [4,] -0.5762690  1.0128172  0.81832523
   [5,] -1.0210079 -0.2816639  0.37849912
   [6,]  0.3372536 -0.6443221 -1.97294375
   [7,]  0.1515502  0.8337617 -0.08762482
   [8,] -1.6534908 -0.2750685  0.34921453
   [9,] -1.5291458 -0.3270133 -0.25242731
  [10,]  0.9134873  0.7595784 -0.24676048


Try the rgeomstats package in your browser

Any scripts or data that you put into this service are public.

rgeomstats documentation built on Nov. 4, 2022, 5:09 p.m.