Package yb.matrix

Examples of yb.matrix.Matrix


    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);

        // PREMIERE MATRICE
        System.out.println("Première matrice : ");
        Matrix m1 = new Matrix(readMatrix());
       
        // DEUXIEME MATRICE
        System.out.println("Première matrice : ");
        Matrix m2 = new Matrix(readMatrix());

        // SOMME
        try {
            System.out.println("M1 + M2 = ");
            System.out.println(m1.add(m2));
View Full Code Here


        System.out.print("Nombres de lignes:\t");
        int rowCount = scn.nextInt();
        System.out.print("Nombres de lignes:\t");
        int colCount = scn.nextInt();

        Matrix matrix = new Matrix(rowCount, colCount);

        scn.useDelimiter("\\s");
        for (int i = 0; i < rowCount; i++) {
            System.out.print("ligne " + String.valueOf(i) + ":\t");
           
            for (int j = 0; j < colCount; j++) {
                matrix.setValue(i, j, scn.nextDouble());
            }
        }
        return matrix;
    }
View Full Code Here

TOP

Related Classes of yb.matrix.Matrix

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.