|
|||||||||
| Home >> All >> riso >> [ distributions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
riso.distributions
Class Product

java.lang.Objectriso.distributions.AbstractConditionalDistribution
riso.distributions.FunctionalRelation
riso.distributions.Product
- All Implemented Interfaces:
- ConditionalDistribution, java.io.Serializable
- public class Product
- extends FunctionalRelation
| Field Summary | |
(package private) int |
ninputs
This is the number of inputs for this product. |
| Fields inherited from class riso.distributions.FunctionalRelation |
NGRID |
| Fields inherited from class riso.distributions.AbstractConditionalDistribution |
associated_variable |
| Constructor Summary | |
Product()
Default constructor for a product. |
|
Product(int ninputs_in)
This constructor sets the number of inputs. |
|
| Method Summary | |
java.lang.Object |
clone()
Return a copy of this object. |
double[] |
dFdx(double[] c)
Compute the gradient of the product of the inputs. |
double |
F(double[] c)
Compute the product of the inputs. |
java.lang.String |
format_string(java.lang.String leading_ws)
Create a description of this distribution as a string. |
int |
ndimensions_parent()
Return the number of dimensions of the parent variables. |
void |
pretty_input(riso.general.SmarterTokenizer st)
Read in a Product from an input stream. |
| Methods inherited from class riso.distributions.FunctionalRelation |
component_roots, get_density, ndimensions_child, p, random |
| Methods inherited from class riso.distributions.AbstractConditionalDistribution |
get_nstates, parse_string, pretty_output, set_variable, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
ninputs
int ninputs
- This is the number of inputs for this product.
This is either specified directly (in a constructor) or by counting
the number of parents of the associated variable.
| Constructor Detail |
Product
public Product()
- Default constructor for a product.
The number of inputs is set to 0; it is assumed that a variable will be
associated with this distribution before any methods that need the number of inputs
are called.
Product
public Product(int ninputs_in)
- This constructor sets the number of inputs.
| Method Detail |
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Return a copy of this object.
- Specified by:
clonein interfaceConditionalDistribution- Overrides:
clonein classFunctionalRelation
ndimensions_parent
public int ndimensions_parent()
- Return the number of dimensions of the parent variables.
pretty_input
public void pretty_input(riso.general.SmarterTokenizer st) throws java.io.IOException
- Read in a Product from an input stream. This is intended for
input from a human-readable source; this is different from object serialization.
The input looks like this:
{ [ninputs ninputs-value] }If ninputs is not specified, it is determined by counting parent variables.- Overrides:
pretty_inputin classAbstractConditionalDistribution
format_string
public java.lang.String format_string(java.lang.String leading_ws) throws java.io.IOException
- Create a description of this distribution as a string.
If this distribution is associated with a variable, the number of inputs
is not put into the description.
- Specified by:
format_stringin interfaceConditionalDistribution- Overrides:
format_stringin classFunctionalRelation
F
public double F(double[] c)
- Compute the product of the inputs.
- Specified by:
Fin classFunctionalRelation
dFdx
public double[] dFdx(double[] c)
- Compute the gradient of the product of the inputs.
- Specified by:
dFdxin classFunctionalRelation
|
|||||||||
| Home >> All >> riso >> [ distributions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC