Local definitions

Special data generation functions

withinRectangle[p_, r_] := <br />    Module[{rx1, ry1, rx2, ry2, x, y}, <b ... ry2, <br />            True, False]] ;

RowBox[{withinRegion2[p_], :=, <br />,     , RowBox[{If, [, <br />,   ... }], ]}]}], ,, <br />,         , True, ,,  , False}], ]}]}]

RowBox[{RowBox[{region1Data[n_], :=, <br />,     , RowBox[{Module, [, RowB ... ;  xd[[count ++]] = p]}]}], ]}], ;, <br />,     , xd}]}], ]}]}], ;}]

RowBox[{RowBox[{region2Data[n_], :=, <br />,         , ... ;  xd[[count ++]] = p]}]}], ]}], ;, <br />,     , xd}]}], ]}]}], ;}]

RowBox[{RowBox[{RR,  , :=,  , RowBox[{Random, [, RowBox[{Real, ,,  , RowBox[{{, RowBox[{0., ,,  , 1.}], }}]}], ]}]}], ;}]

TransformProbabilityVector[prob_] := <br />    Module[{s = 0, len}, <br /> ... nbsp;       Join[Table[s = s + prob[[i]], {i, 1, len}], {1}]] ;

PickOne[ priors_] := <br />    Module[{r}, <br />    & ... ; (Position[(r <= #) & /@ TransformProbabilityVector[priors], True] // Flatten) // First] ;

GenerateFromMixturePDF[{mu_, sigma_, priors_}] := <br />    Module[{k, d,  ... ss]], sigma[[class]] IdentityMatrix[d]]] <br />        ] ;

RowBox[{RowBox[{specialClassPlot,  , :=, RowBox[{Show, [, RowBox[{RowBox[{Graphics, [, RowBox[ ...  }}]}], }}], ]}], ,,  , AspectRatio->Automatic, ,,  , FrameTrue, ,,  , nF}], ]}]}], ;}]

Visualize interlocking regions in 2d

Saved data definition

RowBox[{RowBox[{poly,  , =, RowBox[{{, RowBox[{Partition[ {0, 0, 8, 0, 8, 2, 2, 2, 2, 4, 8, 4, 8, 6, 2, 6, 2, 8, 8, 8, 8, 10, 0, 10}, 2], /, 10.}], }}]}], ;}]

Draw polygonal region

drawPolygonalRegion[polyL_, pr_, color_:LightPink, opt___] := Module[{xmin, xmax, ymin ... 4; {{xmin, xmax}, {ymin, ymax}}, FrameTrue, AspectRatioAutomatic, opt] ] ;

drawAntiPolygonalRegion[polyL_, pr_, color_:LightPink, opt___] := Module[{xmin, xmax,  ... 4; {{xmin, xmax}, {ymin, ymax}}, FrameTrue, AspectRatioAutomatic, opt] ] ;

Plot multiple results for polygonal region

PolygonalAllPlot[polyL_, {μ_, Σ_, priors_}] := Module[{pr, g1, g2, g3, g4, g ... 2371;gb = Show[g1, g3] ; Show[GraphicsArray[{{ga, gb}, {g4, g5}}], yS, imSize] ] ;

Plot multiple results for polygonal region

AntiPolygonalAllPlot[polyL_, {μ_, Σ_, priors_}] := Module[{pr, g1, g2, g3, g ... 2371;gb = Show[g1, g3] ; Show[GraphicsArray[{{ga, gb}, {g4, g5}}], yS, imSize] ] ;


Created by Mathematica  (September 8, 2003)