package JSci.physics;

import JSci.maths.AbstractDoubleVector;

public abstract class AbstractClassicalParticle extends Particle {
        public abstract double getMass();
        public abstract AbstractDoubleVector getPosition();
        public abstract AbstractDoubleVector getVelocity();
        public AbstractDoubleVector getMomentum() {
                return getVelocity().scalarMultiply(getMass());
        }
        public double speed() {
                return getVelocity().norm();
        }
        public double energy() {
                AbstractDoubleVector vel = getVelocity();
                return getMass()*vel.scalarProduct(vel)/2.0;
        }
}

