Java BigDecimal scalarMult(BigDecimal scalar, Vector a)

Here you can find the source of scalarMult(BigDecimal scalar, Vector a)

Description

scalar Mult

License

Open Source License

Declaration

public static Vector<BigDecimal> scalarMult(BigDecimal scalar, Vector<BigDecimal> a) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

import java.util.Vector;

public class Main {
    public static Vector<BigDecimal> scalarMult(BigDecimal scalar, Vector<BigDecimal> a) {
        Vector<BigDecimal> c = (Vector<BigDecimal>) a.clone();
        for (int i = 0; i < a.size(); i++)
            c.set(i, scalar.multiply(((BigDecimal) a.get(i))));

        return c;
    }/* w  w  w  . jav  a  2 s.co  m*/
}

Related

  1. rundeKaufmaennisch( BigDecimal bigDecimal, int stellen)
  2. safeAdd(BigDecimal left, BigDecimal right)
  3. safeAddBD(BigDecimal bd1, BigDecimal bd2)
  4. safeNull(BigDecimal value)
  5. safeToBigDecimal(Object obj1)
  6. scale(BigDecimal b1, BigDecimal b2)
  7. scale2(BigDecimal valor)
  8. scaleCurrency(BigDecimal amount)
  9. secondsBigDecimalFromDuration(long s, int n)