All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.accelad.math.nilgiri.autodiff.VariableVector Maven / Gradle / Ivy

There is a newer version: 1.16
Show newest version
package com.accelad.math.nilgiri.autodiff;

import java.util.Collection;

import com.accelad.math.nilgiri.AbstractIdentityFactory;
import com.accelad.math.nilgiri.Field;

public class VariableVector> extends DifferentialVectorFunction {

    public VariableVector(AbstractIdentityFactory i_factory, Variable... i_v) {
        super(i_factory, i_v);
    }

    public VariableVector(AbstractIdentityFactory i_factory, Collection> i_v) {
        super(i_factory, i_v);
    }

    public Variable get(int i) {
        return (Variable) m_v.get(i);
    }

    public void assign(DifferentialVectorFunction i_v) {
        final int SIZE = size();
        if (SIZE != size()) {
            // throw Error
            return;
        }
        for (int i = SIZE - 1; i >= 0; i--) {
            get(i).set(i_v.get(i).getValue());
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy