You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by du...@apache.org on 2016/01/22 17:33:41 UTC

[05/51] [partial] incubator-systemml git commit: [SYSTEMML-482] [SYSTEMML-480] Adding a Git attributes file to enfore Unix-styled line endings, and normalizing all of the line endings.

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/parfor/parfor_threadid_recompile1.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/parfor/parfor_threadid_recompile1.dml b/src/test/scripts/functions/parfor/parfor_threadid_recompile1.dml
index 8c19b2a..1995f9d 100644
--- a/src/test/scripts/functions/parfor/parfor_threadid_recompile1.dml
+++ b/src/test/scripts/functions/parfor/parfor_threadid_recompile1.dml
@@ -19,32 +19,32 @@
 #
 #-------------------------------------------------------------
 
-
-
-A = read($1)
-
-num_bin_defns = sum(A)
-bin_defns = matrix(0, rows=num_bin_defns, cols=2)
-
-attr2pos = matrix(0, rows=nrow(A), cols=2)
-pos = 1
-for(i in 1:nrow(A)){
-	number_of_bins = castAsScalar(A[i,1])
-	attr2pos[i,1] = pos
-	attr2pos[i,2] = pos + number_of_bins - 1
-	pos = pos + number_of_bins
-}
-
-for(i in 1:nrow(A), check=0){
-	num_bins = castAsScalar(A[i,1])
-	
-	start_position = castAsScalar(attr2pos[i,1])
-	end_position = castAsScalar(attr2pos[i,2])
-	
-	#SEQ CALL 1
-	bin_defns[start_position:end_position,1] = seq(1, num_bins, 1)
-	
-	#SEQ CALL 2
-	bin_defns[start_position:end_position,2] = seq(1, 1+num_bins-1, 1)
-}
-write(bin_defns, $2)
+
+
+A = read($1)
+
+num_bin_defns = sum(A)
+bin_defns = matrix(0, rows=num_bin_defns, cols=2)
+
+attr2pos = matrix(0, rows=nrow(A), cols=2)
+pos = 1
+for(i in 1:nrow(A)){
+	number_of_bins = castAsScalar(A[i,1])
+	attr2pos[i,1] = pos
+	attr2pos[i,2] = pos + number_of_bins - 1
+	pos = pos + number_of_bins
+}
+
+for(i in 1:nrow(A), check=0){
+	num_bins = castAsScalar(A[i,1])
+	
+	start_position = castAsScalar(attr2pos[i,1])
+	end_position = castAsScalar(attr2pos[i,2])
+	
+	#SEQ CALL 1
+	bin_defns[start_position:end_position,1] = seq(1, num_bins, 1)
+	
+	#SEQ CALL 2
+	bin_defns[start_position:end_position,2] = seq(1, 1+num_bins-1, 1)
+}
+write(bin_defns, $2)

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/parfor/parfor_threadid_recompile2.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/parfor/parfor_threadid_recompile2.dml b/src/test/scripts/functions/parfor/parfor_threadid_recompile2.dml
index 85e1a6f..ab89580 100644
--- a/src/test/scripts/functions/parfor/parfor_threadid_recompile2.dml
+++ b/src/test/scripts/functions/parfor/parfor_threadid_recompile2.dml
@@ -19,32 +19,32 @@
 #
 #-------------------------------------------------------------
 
-
-
-A = read($1)
-
-num_bin_defns = sum(A)
-bin_defns = matrix(0, rows=num_bin_defns, cols=2)
-
-attr2pos = matrix(0, rows=nrow(A), cols=2)
-pos = 1
-for(i in 1:nrow(A)){
-	number_of_bins = castAsScalar(A[i,1])
-	attr2pos[i,1] = pos
-	attr2pos[i,2] = pos + number_of_bins - 1
-	pos = pos + number_of_bins
-}
-
-parfor(i in 1:nrow(A), check=0){
-	num_bins = castAsScalar(A[i,1])
-	
-	start_position = castAsScalar(attr2pos[i,1])
-	end_position = castAsScalar(attr2pos[i,2])
-	
-	#SEQ CALL 1
-	bin_defns[start_position:end_position,1] = seq(1, num_bins, 1)
-	
-	#SEQ CALL 2
-	bin_defns[start_position:end_position,2] = seq(1, 1+num_bins-1, 1)
-}
-write(bin_defns, $2)
+
+
+A = read($1)
+
+num_bin_defns = sum(A)
+bin_defns = matrix(0, rows=num_bin_defns, cols=2)
+
+attr2pos = matrix(0, rows=nrow(A), cols=2)
+pos = 1
+for(i in 1:nrow(A)){
+	number_of_bins = castAsScalar(A[i,1])
+	attr2pos[i,1] = pos
+	attr2pos[i,2] = pos + number_of_bins - 1
+	pos = pos + number_of_bins
+}
+
+parfor(i in 1:nrow(A), check=0){
+	num_bins = castAsScalar(A[i,1])
+	
+	start_position = castAsScalar(attr2pos[i,1])
+	end_position = castAsScalar(attr2pos[i,2])
+	
+	#SEQ CALL 1
+	bin_defns[start_position:end_position,1] = seq(1, num_bins, 1)
+	
+	#SEQ CALL 2
+	bin_defns[start_position:end_position,2] = seq(1, 1+num_bins-1, 1)
+}
+write(bin_defns, $2)

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/piggybacking/Piggybacking1_append.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/piggybacking/Piggybacking1_append.dml b/src/test/scripts/functions/piggybacking/Piggybacking1_append.dml
index 99acd13..9e35d60 100644
--- a/src/test/scripts/functions/piggybacking/Piggybacking1_append.dml
+++ b/src/test/scripts/functions/piggybacking/Piggybacking1_append.dml
@@ -1,31 +1,31 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-A = matrix(1,10,10);
-v = matrix(2,10,1);
-
-v = v+sum(A);
-B = append(A,v);
-
-s = sum(B);
-
-write(s, $1);
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+A = matrix(1,10,10);
+v = matrix(2,10,1);
+
+v = v+sum(A);
+B = append(A,v);
+
+s = sum(B);
+
+write(s, $1);
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.R b/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.R
index e4352f5..011853c 100644
--- a/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.R
+++ b/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.R
@@ -1,32 +1,32 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-args <- commandArgs(TRUE)
-library(Matrix)
-
-A = readMM(args[1]);
-x = readMM(args[2]);
-
-y = A %*% x;
-z = A %*% y;
-
-writeMM(as(z, "CsparseMatrix"), args[3]); 
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+args <- commandArgs(TRUE)
+library(Matrix)
+
+A = readMM(args[1]);
+x = readMM(args[2]);
+
+y = A %*% x;
+z = A %*% y;
+
+writeMM(as(z, "CsparseMatrix"), args[3]); 
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.dml b/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.dml
index 1b3be46..227e29b 100644
--- a/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.dml
+++ b/src/test/scripts/functions/piggybacking/Piggybacking1_mvmult.dml
@@ -1,28 +1,28 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-A = read($1); #Rand(rows=100, cols=100, seed=10);
-x = read($2); #Rand(rows=100, cols=1, seed=10);
-
-y = A %*% x;
-z = A %*% y;
-
-write(z, $3);
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+A = read($1); #Rand(rows=100, cols=100, seed=10);
+x = read($2); #Rand(rows=100, cols=1, seed=10);
+
+y = A %*% x;
+z = A %*% y;
+
+write(z, $3);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/piggybacking/Piggybacking_eliminate.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/piggybacking/Piggybacking_eliminate.dml b/src/test/scripts/functions/piggybacking/Piggybacking_eliminate.dml
index cae4097..55b18a3 100644
--- a/src/test/scripts/functions/piggybacking/Piggybacking_eliminate.dml
+++ b/src/test/scripts/functions/piggybacking/Piggybacking_eliminate.dml
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-# Script to reproduce a piggybacking bug related to "eliminated" group lops.
-# The bug appears only when MMultMethod=CPMM was chosen (or forced) for the 
-# operation t(A)%*%E.
-
-A = read("DML/data/A"); #matrix(1,rows=10,cols=10) #
-B = read("DML/data/B"); #matrix(1,rows=10,cols=10) #
-E = read("DML/data/E"); #matrix(1,rows=10,cols=10) #
-
-F = t(A) + B 
-G = t(A) %*% E
-
-H = F + G
-
-write(H, "DML/data/H")
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+# Script to reproduce a piggybacking bug related to "eliminated" group lops.
+# The bug appears only when MMultMethod=CPMM was chosen (or forced) for the 
+# operation t(A)%*%E.
+
+A = read("DML/data/A"); #matrix(1,rows=10,cols=10) #
+B = read("DML/data/B"); #matrix(1,rows=10,cols=10) #
+E = read("DML/data/E"); #matrix(1,rows=10,cols=10) #
+
+F = t(A) + B 
+G = t(A) %*% E
+
+H = F + G
+
+write(H, "DML/data/H")
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/piggybacking/Piggybacking_iqm.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/piggybacking/Piggybacking_iqm.dml b/src/test/scripts/functions/piggybacking/Piggybacking_iqm.dml
index 9a21258..4e4d95a 100644
--- a/src/test/scripts/functions/piggybacking/Piggybacking_iqm.dml
+++ b/src/test/scripts/functions/piggybacking/Piggybacking_iqm.dml
@@ -1,32 +1,32 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-# DML script to reproduce a piggybacking bug that caused
-# combineunary lop to (eagerly) piggbacked into GMR that performs A[,4].
-# However, combineunary can only be piggybacked into SortMR.
-
-A = matrix(1,rows=10,cols=10);
-
-F = A[,4];
-x = interQuartileMean(F);
-
-#print("IQM = " + x );
-write(x, $1);
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+# DML script to reproduce a piggybacking bug that caused
+# combineunary lop to (eagerly) piggbacked into GMR that performs A[,4].
+# However, combineunary can only be piggybacked into SortMR.
+
+A = matrix(1,rows=10,cols=10);
+
+F = A[,4];
+x = interQuartileMean(F);
+
+#print("IQM = " + x );
+write(x, $1);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/RewriteWeightedSigmoid.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/RewriteWeightedSigmoid.R b/src/test/scripts/functions/quaternary/RewriteWeightedSigmoid.R
index d2edb9a..78ad502 100644
--- a/src/test/scripts/functions/quaternary/RewriteWeightedSigmoid.R
+++ b/src/test/scripts/functions/quaternary/RewriteWeightedSigmoid.R
@@ -1,35 +1,35 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-A = as.matrix(readMM(paste(args[1], "A.mtx", sep="")))
-B = as.matrix(readMM(paste(args[1], "B.mtx", sep="")))
-
-C =  B * (1/(1+exp(rowSums(B*(matrix(1,nrow(B),1)%*%A)))));
-
-writeMM(as(C, "CsparseMatrix"), paste(args[2], "C", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+A = as.matrix(readMM(paste(args[1], "A.mtx", sep="")))
+B = as.matrix(readMM(paste(args[1], "B.mtx", sep="")))
+
+C =  B * (1/(1+exp(rowSums(B*(matrix(1,nrow(B),1)%*%A)))));
+
+writeMM(as(C, "CsparseMatrix"), paste(args[2], "C", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedCeMM.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedCeMM.R b/src/test/scripts/functions/quaternary/WeightedCeMM.R
index 0d87d72..9ac0eb4 100644
--- a/src/test/scripts/functions/quaternary/WeightedCeMM.R
+++ b/src/test/scripts/functions/quaternary/WeightedCeMM.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = as.matrix(sum(X * log(U%*%t(V))));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = as.matrix(sum(X * log(U%*%t(V))));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedDivMMLeft.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedDivMMLeft.R b/src/test/scripts/functions/quaternary/WeightedDivMMLeft.R
index e627761..44f6ea3 100644
--- a/src/test/scripts/functions/quaternary/WeightedDivMMLeft.R
+++ b/src/test/scripts/functions/quaternary/WeightedDivMMLeft.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = t(t(U) %*% (W/(U%*%t(V))));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = t(t(U) %*% (W/(U%*%t(V))));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedDivMMMultBasic.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedDivMMMultBasic.R b/src/test/scripts/functions/quaternary/WeightedDivMMMultBasic.R
index 3b1a75b..5ac190e 100644
--- a/src/test/scripts/functions/quaternary/WeightedDivMMMultBasic.R
+++ b/src/test/scripts/functions/quaternary/WeightedDivMMMultBasic.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = W*(U%*%t(V));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = W*(U%*%t(V));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedDivMMMultLeft.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedDivMMMultLeft.R b/src/test/scripts/functions/quaternary/WeightedDivMMMultLeft.R
index 1e2d06c..b915b42 100644
--- a/src/test/scripts/functions/quaternary/WeightedDivMMMultLeft.R
+++ b/src/test/scripts/functions/quaternary/WeightedDivMMMultLeft.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = t(t(U) %*% (W*(U%*%t(V))));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = t(t(U) %*% (W*(U%*%t(V))));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusLeft.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusLeft.R b/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusLeft.R
index 84a3044..fd656f1 100644
--- a/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusLeft.R
+++ b/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusLeft.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = t(t(U) %*% ((W!=0)*(U%*%t(V)-W)));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = t(t(U) %*% ((W!=0)*(U%*%t(V)-W)));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusRight.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusRight.R b/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusRight.R
index 33d59c7..f3ba1e9 100644
--- a/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusRight.R
+++ b/src/test/scripts/functions/quaternary/WeightedDivMMMultMinusRight.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = ((W!=0)*(U%*%t(V)-W)) %*% V;
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = ((W!=0)*(U%*%t(V)-W)) %*% V;
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedDivMMMultRight.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedDivMMMultRight.R b/src/test/scripts/functions/quaternary/WeightedDivMMMultRight.R
index dd95d6c..7f34ae5 100644
--- a/src/test/scripts/functions/quaternary/WeightedDivMMMultRight.R
+++ b/src/test/scripts/functions/quaternary/WeightedDivMMMultRight.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = (W*(U%*%t(V))) %*% V;
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = (W*(U%*%t(V))) %*% V;
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedDivMMRight.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedDivMMRight.R b/src/test/scripts/functions/quaternary/WeightedDivMMRight.R
index 5b05d54..e279ff1 100644
--- a/src/test/scripts/functions/quaternary/WeightedDivMMRight.R
+++ b/src/test/scripts/functions/quaternary/WeightedDivMMRight.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = (W/(U%*%t(V))) %*% V;
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = (W/(U%*%t(V))) %*% V;
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSigmoidP1.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSigmoidP1.R b/src/test/scripts/functions/quaternary/WeightedSigmoidP1.R
index db193cb..50f57ce 100644
--- a/src/test/scripts/functions/quaternary/WeightedSigmoidP1.R
+++ b/src/test/scripts/functions/quaternary/WeightedSigmoidP1.R
@@ -19,19 +19,19 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-UV = U%*%t(V);
-R = X * (1/(1 + exp(-UV)));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+UV = U%*%t(V);
+R = X * (1/(1 + exp(-UV)));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSigmoidP2.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSigmoidP2.R b/src/test/scripts/functions/quaternary/WeightedSigmoidP2.R
index d1b1a52..58a0ced 100644
--- a/src/test/scripts/functions/quaternary/WeightedSigmoidP2.R
+++ b/src/test/scripts/functions/quaternary/WeightedSigmoidP2.R
@@ -19,19 +19,19 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-UV = U%*%t(V);
-R = X * log(1/(1 + exp(-UV)));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+UV = U%*%t(V);
+R = X * log(1/(1 + exp(-UV)));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSigmoidP3.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSigmoidP3.R b/src/test/scripts/functions/quaternary/WeightedSigmoidP3.R
index 34d2e54..3eaa422 100644
--- a/src/test/scripts/functions/quaternary/WeightedSigmoidP3.R
+++ b/src/test/scripts/functions/quaternary/WeightedSigmoidP3.R
@@ -19,19 +19,19 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-UV = -(U%*%t(V));
-R = X * (1/(1 + exp(-UV)));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+UV = -(U%*%t(V));
+R = X * (1/(1 + exp(-UV)));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSigmoidP4.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSigmoidP4.R b/src/test/scripts/functions/quaternary/WeightedSigmoidP4.R
index 495f80f..10c7691 100644
--- a/src/test/scripts/functions/quaternary/WeightedSigmoidP4.R
+++ b/src/test/scripts/functions/quaternary/WeightedSigmoidP4.R
@@ -19,19 +19,19 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-UV = -(U%*%t(V));
-R = X * log(1/(1 + exp(-UV)));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+UV = -(U%*%t(V));
+R = X * log(1/(1 + exp(-UV)));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSquaredLossNo.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSquaredLossNo.R b/src/test/scripts/functions/quaternary/WeightedSquaredLossNo.R
index 0fcd0f0..4acdd8b 100644
--- a/src/test/scripts/functions/quaternary/WeightedSquaredLossNo.R
+++ b/src/test/scripts/functions/quaternary/WeightedSquaredLossNo.R
@@ -19,19 +19,19 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-sl = sum( (X - U %*% t(V)) ^ 2 );
-R = as.matrix(sl);
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+sl = sum( (X - U %*% t(V)) ^ 2 );
+R = as.matrix(sl);
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSquaredLossNo2.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSquaredLossNo2.R b/src/test/scripts/functions/quaternary/WeightedSquaredLossNo2.R
index 36b9d01..80ed1e2 100644
--- a/src/test/scripts/functions/quaternary/WeightedSquaredLossNo2.R
+++ b/src/test/scripts/functions/quaternary/WeightedSquaredLossNo2.R
@@ -1,37 +1,37 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-sl = sum( (U %*% t(V) - X) ^ 2 );
-R = as.matrix(sl);
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+sl = sum( (U %*% t(V) - X) ^ 2 );
+R = as.matrix(sl);
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSquaredLossPost.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSquaredLossPost.R b/src/test/scripts/functions/quaternary/WeightedSquaredLossPost.R
index 9704b25..81cd582 100644
--- a/src/test/scripts/functions/quaternary/WeightedSquaredLossPost.R
+++ b/src/test/scripts/functions/quaternary/WeightedSquaredLossPost.R
@@ -19,20 +19,20 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-
-sl = sum( W * (X - U %*% t(V)) ^ 2 );
-R = as.matrix(sl);
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+
+sl = sum( W * (X - U %*% t(V)) ^ 2 );
+R = as.matrix(sl);
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSquaredLossPost2.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSquaredLossPost2.R b/src/test/scripts/functions/quaternary/WeightedSquaredLossPost2.R
index 6b07556..0d26a71 100644
--- a/src/test/scripts/functions/quaternary/WeightedSquaredLossPost2.R
+++ b/src/test/scripts/functions/quaternary/WeightedSquaredLossPost2.R
@@ -1,38 +1,38 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-
-sl = sum( W * (U %*% t(V) - X) ^ 2 );
-R = as.matrix(sl);
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+
+sl = sum( W * (U %*% t(V) - X) ^ 2 );
+R = as.matrix(sl);
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSquaredLossPostNz.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSquaredLossPostNz.R b/src/test/scripts/functions/quaternary/WeightedSquaredLossPostNz.R
index 1e33024..fed3686 100644
--- a/src/test/scripts/functions/quaternary/WeightedSquaredLossPostNz.R
+++ b/src/test/scripts/functions/quaternary/WeightedSquaredLossPostNz.R
@@ -1,38 +1,38 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-
-sl = sum( (X!=0) * (X - U %*% t(V)) ^ 2 );
-R = as.matrix(sl);
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+
+sl = sum( (X!=0) * (X - U %*% t(V)) ^ 2 );
+R = as.matrix(sl);
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSquaredLossPre.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSquaredLossPre.R b/src/test/scripts/functions/quaternary/WeightedSquaredLossPre.R
index ca89ba7..3b4b2fb 100644
--- a/src/test/scripts/functions/quaternary/WeightedSquaredLossPre.R
+++ b/src/test/scripts/functions/quaternary/WeightedSquaredLossPre.R
@@ -19,20 +19,20 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-
-sl = sum( (X - W * (U %*% t(V))) ^ 2 );
-R = as.matrix(sl);
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+
+sl = sum( (X - W * (U %*% t(V))) ^ 2 );
+R = as.matrix(sl);
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedSquaredLossPre2.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedSquaredLossPre2.R b/src/test/scripts/functions/quaternary/WeightedSquaredLossPre2.R
index ba09e87..c194a09 100644
--- a/src/test/scripts/functions/quaternary/WeightedSquaredLossPre2.R
+++ b/src/test/scripts/functions/quaternary/WeightedSquaredLossPre2.R
@@ -1,38 +1,38 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-
-sl = sum( (W * (U %*% t(V)) - X) ^ 2 );
-R = as.matrix(sl);
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+X = as.matrix(readMM(paste(args[1], "X.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+
+sl = sum( (W * (U %*% t(V)) - X) ^ 2 );
+R = as.matrix(sl);
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedUnaryMMExpDiv.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedUnaryMMExpDiv.R b/src/test/scripts/functions/quaternary/WeightedUnaryMMExpDiv.R
index 0c8f7f7..aa00272 100644
--- a/src/test/scripts/functions/quaternary/WeightedUnaryMMExpDiv.R
+++ b/src/test/scripts/functions/quaternary/WeightedUnaryMMExpDiv.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = W/exp(U%*%t(V));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = W/exp(U%*%t(V));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedUnaryMMExpMult.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedUnaryMMExpMult.R b/src/test/scripts/functions/quaternary/WeightedUnaryMMExpMult.R
index ab2c60e..c2284ce 100644
--- a/src/test/scripts/functions/quaternary/WeightedUnaryMMExpMult.R
+++ b/src/test/scripts/functions/quaternary/WeightedUnaryMMExpMult.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = W*exp(U%*%t(V));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = W*exp(U%*%t(V));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedUnaryMMMult2.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedUnaryMMMult2.R b/src/test/scripts/functions/quaternary/WeightedUnaryMMMult2.R
index 3f868fa..26b25ce 100644
--- a/src/test/scripts/functions/quaternary/WeightedUnaryMMMult2.R
+++ b/src/test/scripts/functions/quaternary/WeightedUnaryMMMult2.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = W*(2*(U%*%t(V)));
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = W*(2*(U%*%t(V)));
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/quaternary/WeightedUnaryMMPow2.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/quaternary/WeightedUnaryMMPow2.R b/src/test/scripts/functions/quaternary/WeightedUnaryMMPow2.R
index 62f2af0..cfc04fe 100644
--- a/src/test/scripts/functions/quaternary/WeightedUnaryMMPow2.R
+++ b/src/test/scripts/functions/quaternary/WeightedUnaryMMPow2.R
@@ -1,36 +1,36 @@
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
-U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
-V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
-
-R = W/(U%*%t(V))^2;
-
-writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
-
-
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+W = as.matrix(readMM(paste(args[1], "W.mtx", sep="")))
+U = as.matrix(readMM(paste(args[1], "U.mtx", sep="")))
+V = as.matrix(readMM(paste(args[1], "V.mtx", sep="")))
+
+R = W/(U%*%t(V))^2;
+
+writeMM(as(R, "CsparseMatrix"), paste(args[2], "R", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/recompile/LiteralReplaceCastScalar.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/recompile/LiteralReplaceCastScalar.dml b/src/test/scripts/functions/recompile/LiteralReplaceCastScalar.dml
index 55655c5..41971bf 100644
--- a/src/test/scripts/functions/recompile/LiteralReplaceCastScalar.dml
+++ b/src/test/scripts/functions/recompile/LiteralReplaceCastScalar.dml
@@ -19,25 +19,25 @@
 #
 #-------------------------------------------------------------
 
-
-scalar1 = $1;
-
-if( 1==1 ){
-   A = Rand(rows=10, cols=10, min=1, max=2);
-   B = Rand(rows=10, cols=10, min=3, max=4);
-   C = Rand(rows=as.scalar(A[1,1]), cols=as.scalar(B[1,1]));
-}  
-
-ret1 = sum(C) * as.double(scalar1);
-ret2 = sum(C) * as.integer(scalar1);
-
-if( sum(C)>0 & as.logical(scalar1) ){
-   ret3 = sum(C) * as.double(scalar1);
-}   
-else {
-   ret3 = sum(C);
-}   
-
-print("Ret1 = "+ret1);
-print("Ret2 = "+ret2);
+
+scalar1 = $1;
+
+if( 1==1 ){
+   A = Rand(rows=10, cols=10, min=1, max=2);
+   B = Rand(rows=10, cols=10, min=3, max=4);
+   C = Rand(rows=as.scalar(A[1,1]), cols=as.scalar(B[1,1]));
+}  
+
+ret1 = sum(C) * as.double(scalar1);
+ret2 = sum(C) * as.integer(scalar1);
+
+if( sum(C)>0 & as.logical(scalar1) ){
+   ret3 = sum(C) * as.double(scalar1);
+}   
+else {
+   ret3 = sum(C);
+}   
+
+print("Ret1 = "+ret1);
+print("Ret2 = "+ret2);
 print("Ret3 = "+ret3);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/recompile/append_nnz.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/recompile/append_nnz.dml b/src/test/scripts/functions/recompile/append_nnz.dml
index 4c7b928..9f5b5ea 100644
--- a/src/test/scripts/functions/recompile/append_nnz.dml
+++ b/src/test/scripts/functions/recompile/append_nnz.dml
@@ -19,25 +19,25 @@
 #
 #-------------------------------------------------------------
 
-
-intercept_status = 2;
-
-X = read ($1);
-
-n = nrow (X);
-m = ncol (X);
-
-ones_n = matrix (1, rows = n, cols = 1);
-zero_cell = matrix (0, rows = 1, cols = 1);
-
-shift_X_cols = matrix (0, rows = 1, cols = m);
-
-if (intercept_status == 2) {
-    X = (X + ones_n %*% shift_X_cols);
-}
-
-X = append (X, ones_n);
-
-if(1==1){ }
-
-print("sum="+sum(X)) 
+
+intercept_status = 2;
+
+X = read ($1);
+
+n = nrow (X);
+m = ncol (X);
+
+ones_n = matrix (1, rows = n, cols = 1);
+zero_cell = matrix (0, rows = 1, cols = 1);
+
+shift_X_cols = matrix (0, rows = 1, cols = m);
+
+if (intercept_status == 2) {
+    X = (X + ones_n %*% shift_X_cols);
+}
+
+X = append (X, ones_n);
+
+if(1==1){ }
+
+print("sum="+sum(X)) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/recompile/constant_propagation_if.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/recompile/constant_propagation_if.R b/src/test/scripts/functions/recompile/constant_propagation_if.R
index 057438f..1b86630 100644
--- a/src/test/scripts/functions/recompile/constant_propagation_if.R
+++ b/src/test/scripts/functions/recompile/constant_propagation_if.R
@@ -19,23 +19,23 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-numrows = as.integer(args[1]);
-numcols = as.integer(args[2]);
-
-if( 1==1 )
-{
-   numrows = numrows + 1;
-   numcols = numcols + 2;
-}  
-
-X = matrix(1, numrows, numcols);
-
-writeMM(as(X, "CsparseMatrix"), paste(args[3], "X", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+numrows = as.integer(args[1]);
+numcols = as.integer(args[2]);
+
+if( 1==1 )
+{
+   numrows = numrows + 1;
+   numcols = numcols + 2;
+}  
+
+X = matrix(1, numrows, numcols);
+
+writeMM(as(X, "CsparseMatrix"), paste(args[3], "X", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/recompile/constant_propagation_if.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/recompile/constant_propagation_if.dml b/src/test/scripts/functions/recompile/constant_propagation_if.dml
index 742fe3e..e3c4178 100644
--- a/src/test/scripts/functions/recompile/constant_propagation_if.dml
+++ b/src/test/scripts/functions/recompile/constant_propagation_if.dml
@@ -19,16 +19,16 @@
 #
 #-------------------------------------------------------------
 
-
-numrows = $1;
-numcols = $2;
-
-if( 1==1 )
-{
-   numrows = numrows + 1;
-   numcols = numcols + 2;
-}  
-
-X = matrix(1, rows=numrows, cols=numcols);
-
-write(X, $3);       
+
+numrows = $1;
+numcols = $2;
+
+if( 1==1 )
+{
+   numrows = numrows + 1;
+   numcols = numcols + 2;
+}  
+
+X = matrix(1, rows=numrows, cols=numcols);
+
+write(X, $3);       

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/recompile/constant_propagation_sb.R
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/recompile/constant_propagation_sb.R b/src/test/scripts/functions/recompile/constant_propagation_sb.R
index a5dd31a..cfa6a00 100644
--- a/src/test/scripts/functions/recompile/constant_propagation_sb.R
+++ b/src/test/scripts/functions/recompile/constant_propagation_sb.R
@@ -19,29 +19,29 @@
 #
 #-------------------------------------------------------------
 
-
-args <- commandArgs(TRUE)
-options(digits=22)
-
-library("Matrix")
-
-numrows = as.integer(args[1]);
-numcols = as.integer(args[2]);
-
-if( 1==1 ){}
-
-numrows2 = numrows;
-numcols2 = numcols;
-
-if( 1!=1 )
-{
-   numrows2 = numrows + 1;
-   numcols2 = numcols + 2;
-}  
-
-
-X = matrix(1, numrows2, numcols2);
-
-writeMM(as(X, "CsparseMatrix"), paste(args[3], "X", sep="")); 
-
-
+
+args <- commandArgs(TRUE)
+options(digits=22)
+
+library("Matrix")
+
+numrows = as.integer(args[1]);
+numcols = as.integer(args[2]);
+
+if( 1==1 ){}
+
+numrows2 = numrows;
+numcols2 = numcols;
+
+if( 1!=1 )
+{
+   numrows2 = numrows + 1;
+   numcols2 = numcols + 2;
+}  
+
+
+X = matrix(1, numrows2, numcols2);
+
+writeMM(as(X, "CsparseMatrix"), paste(args[3], "X", sep="")); 
+
+

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/05d2c0a8/src/test/scripts/functions/recompile/constant_propagation_sb.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/recompile/constant_propagation_sb.dml b/src/test/scripts/functions/recompile/constant_propagation_sb.dml
index 2038b95..add79ed 100644
--- a/src/test/scripts/functions/recompile/constant_propagation_sb.dml
+++ b/src/test/scripts/functions/recompile/constant_propagation_sb.dml
@@ -19,21 +19,21 @@
 #
 #-------------------------------------------------------------
 
-
-numrows = $1;
-numcols = $2;
-
-if( 1==1 ){}
-
-numrows2 = numrows;
-numcols2 = numcols;
-
-if( 1!=1 )
-{
-   numrows2 = numrows + 1;
-   numcols2 = numcols + 2;
-}  
-
-X = matrix(1, rows=numrows2, cols=numcols2);
-
-write(X, $3);       
+
+numrows = $1;
+numcols = $2;
+
+if( 1==1 ){}
+
+numrows2 = numrows;
+numcols2 = numcols;
+
+if( 1!=1 )
+{
+   numrows2 = numrows + 1;
+   numcols2 = numcols + 2;
+}  
+
+X = matrix(1, rows=numrows2, cols=numcols2);
+
+write(X, $3);