Here you can find the source of scalarMult(BigDecimal scalar, Vector
public static Vector<BigDecimal> scalarMult(BigDecimal scalar, Vector<BigDecimal> a)
//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*/ }