Java Matrix Multiply multiply(String[] tempResult, int nextIndex, String[][] pys)

Here you can find the source of multiply(String[] tempResult, int nextIndex, String[][] pys)

Description

multiply

License

Open Source License

Declaration

private static String[] multiply(String[] tempResult, int nextIndex, String[][] pys) 

Method Source Code

//package com.java2s;

public class Main {
    private static String[] multiply(String[] tempResult, int nextIndex, String[][] pys) {
        String[] next = pys[nextIndex];
        int pl = tempResult.length;
        int npl = next.length;
        String[] result = new String[pl * npl];
        int count = 0;
        for (int i = 0; i < pl; i++) {
            for (int j = 0; j < npl; j++) {
                result[count] = tempResult[i] + next[j];
                count++;//from w ww  .  j  av  a  2  s. c o  m
            }
        }
        ++nextIndex;
        if (nextIndex < pys.length) {
            return multiply(result, nextIndex, pys);
        } else {
            return result;
        }
    }
}

Related

  1. multiply(double[][] x, double[][] y)
  2. multiply(final double[][] A, final double[][] B)
  3. multiply(float[][] a, float num)
  4. multiply(float[][] a, float[][] b)
  5. multiply(int[][] mat1, int[][] mat2)
  6. multiplyAffine(final double[][] A, final double[][] B, final double[][] dest, int n)
  7. multiplyMatrices(double[][] a, double[][] b)
  8. multiplyMatrices(float[][] left, float[][] right)
  9. multiplyMatrices(int[][] mat1, int[][] mat2)