瀏覽代碼

Matrix_V5

Jakob Kienegger 6 年之前
父節點
當前提交
acefa91d57
共有 4 個文件被更改,包括 12 次插入14 次删除
  1. 二進制
      Lin_Algebra/Eingabe.class
  2. 5 3
      Lin_Algebra/Eingabe.ctxt
  3. 6 6
      Lin_Algebra/Eingabe.java
  4. 1 5
      Lin_Algebra/package.bluej

二進制
Lin_Algebra/Eingabe.class


+ 5 - 3
Lin_Algebra/Eingabe.ctxt

@@ -2,8 +2,8 @@
 comment0.target=Eingabe
 comment1.params=
 comment1.target=Eingabe()
-comment2.params=dim_m\ dim_n
-comment2.target=void\ einlesen(int,\ int)
+comment2.params=
+comment2.target=void\ einlesen()
 comment3.params=zahl
 comment3.target=double\ faktorCheck(Element)
 comment4.params=zahl\ multi
@@ -14,4 +14,6 @@ comment6.params=
 comment6.target=void\ ausgabe()
 comment7.params=
 comment7.target=void\ gauss()
-numComments=8
+comment8.params=args
+comment8.target=void\ main(java.lang.String[])
+numComments=9

+ 6 - 6
Lin_Algebra/Eingabe.java

@@ -20,9 +20,8 @@ public class Eingabe
         m = 4;
     }
 
-    public void einlesen(int dim_m, int dim_n) throws IOException {
-        m = dim_m;
-        n = dim_n;
+    public void einlesen() throws IOException {
+        
         //InputStreamReader isr = null;
         BufferedReader br = null;
         matrix = new Element[m][n];
@@ -30,7 +29,7 @@ public class Eingabe
             for (int j = 0; j < m; j++) {
                 try {
                     br = new BufferedReader(new InputStreamReader(System.in));
-                    System.out.print(+i + "," + j + ": ");
+                    System.out.print(+ i + "," + j + ": ");
                     String eingabe = br.readLine();
                     matrix[i][j] = new Element(Integer.parseInt(eingabe));
                 } catch (IOException e) {
@@ -91,7 +90,7 @@ public class Eingabe
     
     public void gauss() throws IOException
     {
-        einlesen(m, n);
+        //einlesen(m, n);
         zeilenFaktor(0);
         for(int j=1; j<3; j++)
         {
@@ -137,7 +136,8 @@ public class Eingabe
         Eingabe a = new Eingabe();
 
         try {
-            a.einlesen(2,2);
+            a.einlesen();
+            a.gauss();
         } catch (IOException e) {
             e.printStackTrace();
         }

+ 1 - 5
Lin_Algebra/package.bluej

@@ -4,12 +4,8 @@ dependency1.to=Element
 dependency1.type=UsesDependency
 editor.fx.0.height=873
 editor.fx.0.width=720
-editor.fx.0.x=720
+editor.fx.0.x=0
 editor.fx.0.y=0
-editor.fx.1.height=873
-editor.fx.1.width=720
-editor.fx.1.x=0
-editor.fx.1.y=0
 objectbench.height=93
 objectbench.width=763
 package.divider.horizontal=0.5422535211267606