2 * Description: Output methods for Array
4 * @ Author Create/Modi Note
5 * Xiaofeng Xie Feb 22, 2001
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * Please acknowledge the author(s) if you use this code in any way.
23 package net
.adaptivebox
.global
;
26 public class OutputMethods
{
28 public OutputMethods() {
31 public static String
outputVectorAsStr(double[] vector
){
32 if(vector
==null) return "NULL";
34 for(int i
=0;i
<vector
.length
;i
++){
35 totalStr
+= vector
[i
];
36 if(i
!=vector
.length
-1) {
44 public static void outputVector(double[] vector
){
45 for(int i
=0;i
<vector
.length
;i
++){
46 System
.out
.print(vector
[i
]+" \t");
48 System
.out
.println("");