📄 bayesnet.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_04) on Tue Jun 22 19:42:08 EDT 2004 --><TITLE>BayesNet (JavaBayes API)</TITLE><META NAME="keywords" CONTENT="BayesianNetworks.BayesNet class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="BayesNet (JavaBayes API)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>JavaBayes API</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../BayesianNetworks/ConvertInterchangeFormat.html" title="class in BayesianNetworks"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" target="_top"><B>FRAMES</B></A> <A HREF="BayesNet.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">BayesianNetworks</FONT><BR>Class BayesNet</H2><PRE>java.lang.Object <IMG SRC="../resources/inherit.gif" ALT="extended by"><B>BayesianNetworks.BayesNet</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../QuasiBayesianNetworks/QuasiBayesNet.html" title="class in QuasiBayesianNetworks">QuasiBayesNet</A></DD></DL><HR><DL><DT>public class <B>BayesNet</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL><P><DL><DT><B>See Also:</B><DD><A HREF="../serialized-form.html#BayesianNetworks.BayesNet">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BIF">BIF</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BUGS">BUGS</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#INVALID_INDEX">INVALID_INDEX</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#name">name</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../BayesianNetworks/ProbabilityFunction.html" title="class in BayesianNetworks">ProbabilityFunction</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#probability_functions">probability_functions</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../BayesianNetworks/ProbabilityVariable.html" title="class in BayesianNetworks">ProbabilityVariable</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#probability_variables">probability_variables</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#properties">properties</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../BayesianNetworks/DiscreteFunction.html" title="class in BayesianNetworks">DiscreteFunction</A></CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#utility_function">utility_function</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#XML">XML</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BayesNet()">BayesNet</A></B>()</CODE><BR> Default constructor for a BayesNet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BayesNet(BayesianNetworks.BayesNet)">BayesNet</A></B>(<A HREF="../BayesianNetworks/BayesNet.html" title="class in BayesianNetworks">BayesNet</A> bn)</CODE><BR> Simple constructor for a BayesNet; creates a copy of a given network.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BayesNet(java.io.InputStream)">BayesNet</A></B>(java.io.InputStream istream)</CODE><BR> Construct a BayesNet from a textual description in a stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BayesNet(java.lang.String)">BayesNet</A></B>(java.lang.String s)</CODE><BR> Construct a BayesNet from a textual description in a string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BayesNet(java.lang.String, int, int)">BayesNet</A></B>(java.lang.String n_n, int n_v, int n_f)</CODE><BR> Simple constructor for a BayesNet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BayesNet(java.lang.String, java.util.Vector)">BayesNet</A></B>(java.lang.String n_n, java.util.Vector p)</CODE><BR> Simple constructor for a BayesNet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BayesNet(java.net.URL)">BayesNet</A></B>(java.net.URL url)</CODE><BR> Construct a BayesNet from a textual description in an URL.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#BayesNet(java.net.URL, java.lang.String)">BayesNet</A></B>(java.net.URL context, java.lang.String spec)</CODE><BR> Construct a BayesNet from a textual description in an URL.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#add_property(java.lang.String)">add_property</A></B>(java.lang.String prop)</CODE><BR> Add a property.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String[][]</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_all_evidence()">get_all_evidence</A></B>()</CODE><BR> Get all the evidence contained in the network variables.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../BayesianNetworks/ProbabilityFunction.html" title="class in BayesianNetworks">ProbabilityFunction</A></CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_function(BayesianNetworks.ProbabilityVariable)">get_function</A></B>(<A HREF="../BayesianNetworks/ProbabilityVariable.html" title="class in BayesianNetworks">ProbabilityVariable</A> p_v)</CODE><BR> Find the ProbabilityFunction that corresponds to a given ProbabilityVariable.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_name()">get_name</A></B>()</CODE><BR> Get the name of the network.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../BayesianNetworks/ProbabilityFunction.html" title="class in BayesianNetworks">ProbabilityFunction</A></CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_probability_function(int)">get_probability_function</A></B>(int index)</CODE><BR> Get the probability function at a given index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../BayesianNetworks/ProbabilityFunction.html" title="class in BayesianNetworks">ProbabilityFunction</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_probability_functions()">get_probability_functions</A></B>()</CODE><BR> Get the probability functions.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../BayesianNetworks/ProbabilityVariable.html" title="class in BayesianNetworks">ProbabilityVariable</A></CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_probability_variable(int)">get_probability_variable</A></B>(int index)</CODE><BR> Get the probability variable at a given index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../BayesianNetworks/ProbabilityVariable.html" title="class in BayesianNetworks">ProbabilityVariable</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_probability_variables()">get_probability_variables</A></B>()</CODE><BR> Get the probability variables.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_properties()">get_properties</A></B>()</CODE><BR> Get the properties.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../BayesianNetworks/DiscreteFunction.html" title="class in BayesianNetworks">DiscreteFunction</A></CODE></FONT></TD><TD><CODE><B><A HREF="../BayesianNetworks/BayesNet.html#get_utility_function()">get_utility_function</A></B>()</CODE><BR> Get the utility function.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -