package jasymca; /* Jasymca - - Symbolic Calculator for Mobile Devices This version is written for J2ME, CLDC 1.1, MIDP 2, JSR 75 or J2SE Copyright (C) 2006 - Helmut Dersch der@hs-furtwangen.de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /*------------------------------------------------------------*/ import java.util.Vector; public class Vektor extends Algebraic{ Algebraic coord[]; public Vektor(Algebraic[] coord){ this.coord = coord; } public static Vektor create(Vector v) throws JasymcaException{ Algebraic[] coord = new Algebraic[v.size()]; for(int i=0; icoord.length) throw new JasymcaException("Index out of bounds."); return coord[i-1]; } public int dim(){ return coord.length; } public Vector vector(){ Vector r = new Vector(coord.length); for(int i=0; i