Java Array Divide divide(double[] array, double divisor)

Here you can find the source of divide(double[] array, double divisor)

Description

divide

License

Open Source License

Declaration

public static void divide(double[] array, double divisor) 

Method Source Code

//package com.java2s;
/* ===========================================================
 * GTNA : Graph-Theoretic Network Analyzer
 * ===========================================================
 *
 * (C) Copyright 2009-2011, by Benjamin Schiller (P2P, TU Darmstadt)
 * and Contributors//from   ww  w  .  j  a v  a 2s .c  o m
 *
 * Project Info:  http://www.p2p.tu-darmstadt.de/research/gtna/
 *
 * GTNA is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * GTNA is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * ---------------------------------------
 * ArraysUtils.java
 * ---------------------------------------
 * (C) Copyright 2009-2011, by Benjamin Schiller (P2P, TU Darmstadt)
 * and Contributors 
 *
 * Original Author: benni;
 * Contributors:    -;
 *
 * Changes since 2011-05-17
 * ---------------------------------------
 *
 */

public class Main {
    public static void divide(double[] array, double divisor) {
        for (int i = 0; i < array.length; i++) {
            array[i] /= divisor;
        }
    }

    public static void divide(double[][] array, int index, double divisor) {
        for (int i = 0; i < array.length; i++) {
            array[i][index] /= divisor;
        }
    }
}

Related

  1. div(String[] X)
  2. div_one(double[][] A)
  3. divide(double[] a, double sum)
  4. divide(double[] a, double v)
  5. divide(double[] a, double[] b)
  6. divide(double[] array, double value)
  7. divide(double[] dividend, double[] divisor, double dividendAdjustment, double divisorAdjustment)
  8. divide(double[] numerator, double[] denominator)
  9. divide(double[] t1, double[] t2)