Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

riso.distributions
Class GaussianDelta  view GaussianDelta download GaussianDelta.java

java.lang.Object
  extended byriso.distributions.AbstractDistribution
      extended byriso.distributions.Gaussian
          extended byriso.distributions.GaussianDelta
All Implemented Interfaces:
ConditionalDistribution, Delta, Distribution, LocationScaleDensity, java.io.Serializable, Translatable

public class GaussianDelta
extends Gaussian
implements Delta

An object of this class represents a continuous distribution whose mass is concentrated at one point. An instance of this class can be used anywhere that an instance of Gaussian can be used.


Field Summary
 
Fields inherited from class riso.distributions.Gaussian
alpha, beta, det_Sigma, eta, L_Sigma, mu, mu_hat, ndims, rng, Sigma, Sigma_inverse
 
Fields inherited from class riso.distributions.AbstractDistribution
associated_variable
 
Constructor Summary
GaussianDelta()
           
GaussianDelta(double support_point)
           
GaussianDelta(double[] support_point)
           
 
Method Summary
 java.lang.String format_string(java.lang.String leading_ws)
          Create a description of this distribution model as a string.
 double[] get_support()
          Return the point on which the mass of this density is concentrated.
 double p(double[] x)
          Computes the density at the point x.
 void pretty_input(riso.general.SmarterTokenizer st)
          Read a description of this distribution model from an input stream.
 double[] random()
          Return an instance of a random variable from this distribution.
 double update(double[][] x, double[] responsibility, int niter_max, double stopping_criterion)
          Place-holder for method to update the parameters of this distribution; not implemented -- see exception description.
 
Methods inherited from class riso.distributions.Gaussian
cdf, clone, densities_product_constant, densities_product, effective_support, expected_value, format_string_1d, g, g1, get_location, get_scale, get_Sigma, initial_mix, log_p, log_prior, ndimensions, set_location, set_scale, set_Sigma, sqrt_variance, translate
 
Methods inherited from class riso.distributions.AbstractDistribution
get_density, get_nstates, ndimensions_child, ndimensions_parent, p, parse_string, pretty_output, random, set_variable, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface riso.distributions.Distribution
cdf, effective_support, expected_value, initial_mix, log_p, log_prior, ndimensions, sqrt_variance
 
Methods inherited from interface riso.distributions.ConditionalDistribution
clone, get_density, get_nstates, ndimensions_child, ndimensions_parent, p, parse_string, random, set_variable
 

Constructor Detail

GaussianDelta

public GaussianDelta()

GaussianDelta

public GaussianDelta(double[] support_point)

GaussianDelta

public GaussianDelta(double support_point)
Method Detail

get_support

public double[] get_support()
Return the point on which the mass of this density is concentrated.

Specified by:
get_support in interface Delta

p

public double p(double[] x)
         throws java.lang.IllegalArgumentException
Computes the density at the point x. This method is a little strange since this distribution is continuous, and strictly speaking a meaningful density can't be defined in that case. Oh, well.

Specified by:
p in interface Distribution
Overrides:
p in class Gaussian

random

public double[] random()
                throws java.lang.Exception
Return an instance of a random variable from this distribution. This function always returns the point on which this distribution is concentrated, since all the mass is there.

Specified by:
random in interface Distribution
Overrides:
random in class Gaussian

update

public double update(double[][] x,
                     double[] responsibility,
                     int niter_max,
                     double stopping_criterion)
              throws java.lang.Exception
Place-holder for method to update the parameters of this distribution; not implemented -- see exception description.

Specified by:
update in interface Distribution
Overrides:
update in class Gaussian

pretty_input

public void pretty_input(riso.general.SmarterTokenizer st)
                  throws java.io.IOException
Read a description of this distribution model from an input stream. This is intended for input from a human-readable source; this is different from object serialization.

Overrides:
pretty_input in class Gaussian

format_string

public java.lang.String format_string(java.lang.String leading_ws)
                               throws java.io.IOException
Create a description of this distribution model as a string.

Specified by:
format_string in interface ConditionalDistribution
Overrides:
format_string in class Gaussian