# SCM Repository

[matrix] Diff of /pkg/R/HBMM.R
 [matrix] / pkg / R / HBMM.R

# Diff of /pkg/R/HBMM.R

revision 2048, Tue Aug 14 15:09:10 2007 UTC revision 2049, Tue Aug 14 22:22:24 2007 UTC
# Line 106  Line 106
106                 comment.char = "%", quiet = TRUE)                 comment.char = "%", quiet = TRUE)
107      nc <- scan(file, nmax = 1, what = integer(0), quiet = TRUE)      nc <- scan(file, nmax = 1, what = integer(0), quiet = TRUE)
108      nz <- scan(file, nmax = 1, what = integer(0), quiet = TRUE)      nz <- scan(file, nmax = 1, what = integer(0), quiet = TRUE)
109      if (repr == "coordinate" && elt == "real") {      if (repr == "coordinate" && elt %in% c("real", "integer")) {
110    ### FIXME: Should the "integer" element type be returned as an object
111    ### that inherits from the "iMatrix" class?
112    ### FIXME: What about pattern and complex element types?
113          els <- scan(file, nmax = nz,          els <- scan(file, nmax = nz,
114                      what = list(i = integer(0), j = integer(0),                      what = list(i = integer(0), j = integer(0),
115                      x = numeric(0)), quiet = TRUE)                      x = numeric(0)), quiet = TRUE)
# Line 116  Line 119
119          if (sym == "symmetric")          if (sym == "symmetric")
120              return(new("dsTMatrix", uplo = "L", Dim = c(nr, nc),              return(new("dsTMatrix", uplo = "L", Dim = c(nr, nc),
121                         i = els\$i - 1L, j = els\$j - 1L, x = els\$x))                         i = els\$i - 1L, j = els\$j - 1L, x = els\$x))
122      }      } else
123        stop(gettextf("\"readMM\" is not yet implemented for element type",
124                      elt))
125  }  }

Legend:
 Removed from v.2048 changed lines Added in v.2049