ch.javasoft.smx.ops
Class ScalarOps

java.lang.Object
  extended by ch.javasoft.smx.ops.ScalarOps

public class ScalarOps
extends Object

The ScalarOps class contains static methods performing operations with a matrix and a scalar. Such operations are for instance scaling all matrix elements with the same factor, or adding a value to each matrix element.


Method Summary
static
<N extends Number>
DoubleMatrix
add(ReadableDoubleMatrix src, double value)
           
static
<N extends Number>
IntMatrix
add(ReadableIntMatrix src, int value)
           
static
<N extends Number>
LongMatrix
add(ReadableLongMatrix src, long value)
           
static
<N extends Number>
ReadableMatrix<N>
addGeneric(ReadableMatrix<N> src, N value)
           
static DoubleMatrix scale(ReadableDoubleMatrix src, double factor)
           
static void scale(ReadableDoubleMatrix src, WritableDoubleMatrix dst, double factor)
           
static IntMatrix scale(ReadableIntMatrix src, int factor)
           
static void scale(ReadableIntMatrix src, WritableIntMatrix dst, int factor)
           
static IntRationalMatrix scale(ReadableIntRationalMatrix src, int mulFactor, int divFactor)
           
static void scale(ReadableIntRationalMatrix src, WritableIntRationalMatrix dst, int mulFactor, int divFactor)
           
static LongMatrix scale(ReadableLongMatrix src, long factor)
           
static void scale(ReadableLongMatrix src, WritableLongMatrix dst, long factor)
           
static
<N extends Number>
ReadableMatrix<N>
scaleGeneric(ReadableMatrix<N> src, N factor)
           
static DoubleMatrix scaleRow(ReadableDoubleMatrix src, int row, double factor)
           
static void scaleRow(ReadableDoubleMatrix src, WritableDoubleMatrix dst, int row, double factor)
           
static IntMatrix scaleRow(ReadableIntMatrix src, int row, int factor)
           
static void scaleRow(ReadableIntMatrix src, WritableIntMatrix dst, int row, int factor)
           
static IntRationalMatrix scaleRow(ReadableIntRationalMatrix src, int row, int mulFactor, int divFactor)
           
static void scaleRow(ReadableIntRationalMatrix src, WritableIntRationalMatrix dst, int row, int mulFactor, int divFactor)
           
static
<N extends Number>
ReadableMatrix<N>
subtractGeneric(ReadableMatrix<N> src, N value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public static <N extends Number> DoubleMatrix add(ReadableDoubleMatrix src,
                                                  double value)

add

public static <N extends Number> IntMatrix add(ReadableIntMatrix src,
                                               int value)

add

public static <N extends Number> LongMatrix add(ReadableLongMatrix src,
                                                long value)

subtractGeneric

public static <N extends Number> ReadableMatrix<N> subtractGeneric(ReadableMatrix<N> src,
                                                                   N value)

addGeneric

public static <N extends Number> ReadableMatrix<N> addGeneric(ReadableMatrix<N> src,
                                                              N value)

scale

public static IntMatrix scale(ReadableIntMatrix src,
                              int factor)

scale

public static void scale(ReadableIntMatrix src,
                         WritableIntMatrix dst,
                         int factor)

scale

public static LongMatrix scale(ReadableLongMatrix src,
                               long factor)

scale

public static void scale(ReadableLongMatrix src,
                         WritableLongMatrix dst,
                         long factor)

scaleGeneric

public static <N extends Number> ReadableMatrix<N> scaleGeneric(ReadableMatrix<N> src,
                                                                N factor)

scaleRow

public static IntMatrix scaleRow(ReadableIntMatrix src,
                                 int row,
                                 int factor)

scaleRow

public static void scaleRow(ReadableIntMatrix src,
                            WritableIntMatrix dst,
                            int row,
                            int factor)

scale

public static IntRationalMatrix scale(ReadableIntRationalMatrix src,
                                      int mulFactor,
                                      int divFactor)

scale

public static void scale(ReadableIntRationalMatrix src,
                         WritableIntRationalMatrix dst,
                         int mulFactor,
                         int divFactor)

scaleRow

public static IntRationalMatrix scaleRow(ReadableIntRationalMatrix src,
                                         int row,
                                         int mulFactor,
                                         int divFactor)

scaleRow

public static void scaleRow(ReadableIntRationalMatrix src,
                            WritableIntRationalMatrix dst,
                            int row,
                            int mulFactor,
                            int divFactor)

scale

public static DoubleMatrix scale(ReadableDoubleMatrix src,
                                 double factor)

scale

public static void scale(ReadableDoubleMatrix src,
                         WritableDoubleMatrix dst,
                         double factor)

scaleRow

public static DoubleMatrix scaleRow(ReadableDoubleMatrix src,
                                    int row,
                                    double factor)

scaleRow

public static void scaleRow(ReadableDoubleMatrix src,
                            WritableDoubleMatrix dst,
                            int row,
                            double factor)