Sautrela

edu.gtts.sautrela.vq
Class Quantizer

java.lang.Object
  extended by edu.gtts.sautrela.engine.AbstractDataProcessor
      extended by edu.gtts.sautrela.vq.Quantizer
All Implemented Interfaces:
DataProcessor, java.beans.BeanInfo, java.io.Serializable

public class Quantizer
extends AbstractDataProcessor

A Dataprocessor that implements a Vector Quantizer.

Author:
Mikel Peñagarikano
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
Quantizer()
          Creates a new Quantizer
 
Method Summary
 void editBeanInfo(java.beans.BeanInfo info)
           
 java.net.URL getUrl()
          Gets the URL of the ClusterSet of this Quantizer
 boolean isBinary()
          Getter for property binary.
static void main(java.lang.String[] args)
           
 void process(Buffer in, Buffer out)
          The index of the nearest cluster is obtained.
 void setBinary(boolean binary)
          Setter for property binary.
 void setUrl(java.net.URL url)
          Sets the file that contains the ClusterSet of this Quantizer
 
Methods inherited from class edu.gtts.sautrela.engine.AbstractDataProcessor
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getName, getPropertyDescriptors, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Quantizer

public Quantizer()
          throws DataProcessorException
Creates a new Quantizer

Throws:
DataProcessorException
Method Detail

getUrl

public java.net.URL getUrl()
Gets the URL of the ClusterSet of this Quantizer

Returns:
The URl of the ClusterSet

setUrl

public void setUrl(java.net.URL url)
Sets the file that contains the ClusterSet of this Quantizer

Parameters:
url - The file that contains the ClusterSet

process

public void process(Buffer in,
                    Buffer out)
             throws DataProcessorException
The index of the nearest cluster is obtained. Such index is sended in a IntData.

Parameters:
in - Input Buffer
out - Output Buffer
Throws:
DataProcessorException

isBinary

public boolean isBinary()
Getter for property binary.

Returns:
Value of property binary.

setBinary

public void setBinary(boolean binary)
Setter for property binary.

Parameters:
binary - New value of property binary.

editBeanInfo

public void editBeanInfo(java.beans.BeanInfo info)
Overrides:
editBeanInfo in class AbstractDataProcessor

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

Sautrela