001    /*

002     * JNI_SVM-light - A Java Native Interface for SVM-light

003     * 

004     * Copyright (C) 2005 

005     * Tom Crecelius & Martin Theobald 

006     * Max-Planck Institute for Computer Science

007     * 

008     * This program is free software; you can redistribute it and/or modify it under

009     * the terms of the GNU General Public License as published by the Free Software

010     * Foundation.

011     * 

012     * This program is distributed in the hope that it will be useful, but WITHOUT

013     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

014     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

015     * details.

016     * 

017     * You should have received a copy of the GNU General Public License along with

018     * this program; if not, write to the Free Software Foundation, Inc., 51

019     * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

020     */

021    

022    package jnisvmlight;

023    

024    /**

025     * Abstract class for an extended kernel.

026     * 

027     * @author Tom Crecelius & Martin Theobald

028     */

029    public abstract class ExtendedKernel extends Kernel {

030    

031      protected double m_a;

032    

033      protected double m_c;

034    

035      protected ExtendedKernel() {

036        super();

037        this.m_a = 1.0;

038        this.m_c = 0.0;

039      }

040    

041      protected ExtendedKernel(Kernel nestedKernel, double multiplier,

042          double constant) {

043        super(nestedKernel);

044        this.m_a = multiplier;

045        this.m_c = constant;

046      }

047    

048      public double getConstant() {

049        return m_c;

050      }

051    

052      public double getMultiplier() {

053        return m_a;

054      }

055    

056      public void setConstant(double c) {

057        this.m_c = c;

058      }

059    

060      public void setMultiplier(double m) {

061        this.m_a = m;

062      }

063    }