SipEncode

Revision as of 23:40, 11 December 2009 by Lchrisman (talk | contribs) (Created page with '= SipEncode( x'', i, name, type, origin, useDll'' ) = Encodes a ''Stochastic Information Packet'' (SIP) as XML, using the [http://ProbabilityManagement.org/Dist.htm DIST<sup>TM<…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SipEncode( x, i, name, type, origin, useDll )

Encodes a Stochastic Information Packet (SIP) as XML, using the DISTTM 1.0 Distribution String] standard introduced in:

Sam Savage, Stefan Scholtes and Daniel Zweidler (Feb 2006), "Probability Management - Part 1", OR/MS Today 33:1.

Basically, this takes a 1-D vector of numbers, most commonly an uncertainty sample indexed by Run, and returns an xml text value that encodes the vector of numbers in a compressed textual form. The compression is lossy (except that the «type»="Binary" case is non-lossy when x is 0 or 1 everywhere). A decompressed version can be recovered from the xml text using SipDecode. The decompressed version will be very close to the original, and will preserve the average value.

Parameters

«x»
A vector of numbers indexed by «i», or by Run if «i» is omitted.
«i»
(optional) The index of «x». Defaults to Run.
«name»
(optional) The name of the distribution. Defaults to the name of «x» when «x» is an identifier, otherwise defaults to the name of the variable being evaluated when «x» is a general expression.
«type»
(optional) The precision type, either "Single", "Double", or "Binary" (or "S", "D", or "B"), which determines how precisely the values are encoded in the compression. A "Single" type uses about 1 1/3 characters per number, "Double" uses about 2 2/3 characters per number and preserves the original numbers with greater precision than "Single". "Binary" encodes bernoulli outcomes (true/false), encoding 6 binary values per character.
«origin»
(optional) Documentation included in the xml specifying the source for the data or assessment.
«useDll»
(optional) See "Using an external DLL to compute" below.

Using an External DLL

See Also

Comments


You are not allowed to post comments.