📄 node263.html
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by: Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by: Nikos Drakos, CBLU, University of Leeds* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>22.5 Some mathematical-support related objects</TITLE><META NAME="description" CONTENT="22.5 Some mathematical-support related objects"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="next" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html"><LINK REL="previous" HREF="node262.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node262.html"><LINK REL="up" HREF="node247.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node247.html"><LINK REL="next" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html5336" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html5330" HREF="node247.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node247.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html5324" HREF="node262.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node262.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html5332" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html5334" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html5337" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html">22.6 Commands at a</A><B> Up:</B> <A NAME="tex2html5331" HREF="node247.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node247.html">22. Mathematical Support</A><B> Previous:</B> <A NAME="tex2html5325" HREF="node262.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node262.html">22.4 ns-random</A>   <B> <A NAME="tex2html5333" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html5335" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION04250000000000000000"></A><A NAME="sec:mathobjects"></A><BR>22.5 Some mathematical-support related objects</H1><P>I<SMALL>NTEGRATOR OBJECTS</SMALL>Integrator Objects support the approximate computation of continuousintegrals using discrete sums. The running sum(integral) is computed as:<TT>sum_ += [lasty_ * (x lastx_)]</TT> where (x, y) is the last elemententered and(lastx_, lasty_) was the element previous to that added to the sum.lastx_ and lasty_ are updated as new elements are added. The firstsample point defaults to (0,0) that can be changed by changing the valuesof (lastx_,lasty_). <TT>$integrator newpoint x y</TT><BR>Add the point (x,y) to the sum. Note that it does not make sense for x tobe less than lastx_. <P>There are no configuration parameters specific to this object. <BR><P>State Variables are:<DL><DT><STRONG>lastx_</STRONG></DT><DD>x-coordinate of the last sample point. <P></DD><DT><STRONG>lasty_</STRONG></DT><DD>y-coordinate of the last sample point. <P></DD><DT><STRONG>sum_</STRONG></DT><DD>Running sum (i.e. the integral) of the sample points. </DD></DL><P>S<SMALL>AMPLES </SMALL>O<SMALL>BJECT</SMALL>Samples Objects support the computation of mean and variance statisticsfor a given sample. <P><TT>$samples mean</TT><BR>Returns mean of the sample. <P><TT>$samples variance</TT><BR>Returns variance of the sample. <P><TT>$samples cnt</TT><BR>Returns a count of the sample points considered. <P><TT>$samples reset </TT><BR>Reset the Samples object to monitor a fresh set of samples. <P>There are no configuration parameters or state variables specific to thisobject. <P><HR><!--Navigation Panel--><A NAME="tex2html5336" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html5330" HREF="node247.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node247.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html5324" HREF="node262.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node262.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html5332" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html5334" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html5337" HREF="node264.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node264.html">22.6 Commands at a</A><B> Up:</B> <A NAME="tex2html5331" HREF="node247.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node247.html">22. Mathematical Support</A><B> Previous:</B> <A NAME="tex2html5325" HREF="node262.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node262.html">22.4 ns-random</A>   <B> <A NAME="tex2html5333" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html5335" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -