Revision 04bbc417cf2927b827660bc07743429783569aec authored by HwB on 10 February 2013, 00:00:00 UTC, committed by Gabor Csardi on 10 February 2013, 00:00:00 UTC
1 parent 0e3ae6b
Raw File
norm.R
##
##  n o r m  Test suite
##


Norm <- pracma::Norm

identical(Norm(c(3, 4)), 5)
identical(Norm(c(1, 1, 1), p=2), sqrt(3))
identical(Norm(1:10, p = 1), sum(1:10)+0.0)
identical(Norm(1:10, p = 0), Inf)
identical(Norm(1:10, p = Inf), max(1:10))
identical(Norm(1:10, p = -Inf), min(1:10))
back to top