|
| 1 | +#------------------------------------------------------------- |
| 2 | +# |
| 3 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +# or more contributor license agreements. See the NOTICE file |
| 5 | +# distributed with this work for additional information |
| 6 | +# regarding copyright ownership. The ASF licenses this file |
| 7 | +# to you under the Apache License, Version 2.0 (the |
| 8 | +# "License"); you may not use this file except in compliance |
| 9 | +# with the License. You may obtain a copy of the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, |
| 14 | +# software distributed under the License is distributed on an |
| 15 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +# KIND, either express or implied. See the License for the |
| 17 | +# specific language governing permissions and limitations |
| 18 | +# under the License. |
| 19 | +# |
| 20 | +#------------------------------------------------------------- |
| 21 | + |
| 22 | +args<-commandArgs(TRUE) |
| 23 | +options(digits=22) |
| 24 | +library("Matrix") |
| 25 | +# library("matrixStats") |
| 26 | + |
| 27 | +W = matrix(seq(28,29), 1, 2) |
| 28 | +J = matrix(0, 1, 8) |
| 29 | +Z = cbind(J, W, J) |
| 30 | +Y = matrix(0, 10, 18) |
| 31 | +X = rbind(Z, Y, Y, Y, Y, Y, Y, Y, Y) |
| 32 | +v = seq(1,81) |
| 33 | +v1 = seq(20, 37) |
| 34 | +W = matrix(seq(13,14), 1, 2) |
| 35 | +J = matrix(0, 1, 8) |
| 36 | +Z= cbind(J, W, J) |
| 37 | +Y = matrix(0, 10, 18) |
| 38 | +K = rbind(Z, Y, Y, Y, Y, Y, Y, Y, Y) |
| 39 | + |
| 40 | +S = (abs(X)*K)+rowSums(X*v) |
| 41 | + |
| 42 | + |
| 43 | +writeMM(as(S, "CsparseMatrix"), paste(args[2], "S", sep="")); |
0 commit comments