Spherical.Htm.Cover Class Reference

Cover provides static (a) methods to generate trixel coverings of regions. More...

List of all members.

Public Member Functions

void Init (Spherical.Region r)
 Initialize internals.
 Cover (Spherical.Region reg)
 Create a Cover object with the given Region, and initialize the internal cover machine.
Int64 GetPseudoArea (Markup kind)
 Compute the pseudoare of selected part of the covering.
int Cost ()
 Compute the cost in resources in the current state of the Cover object.
void SetTunables (int minr, int maxr, int maxl)
 Change the tunable parameters for the generation of the covering.
void Run ()
 Run this cover machine until completion.
void Step ()
 Step this machine to the next level.
int One ()
 The One function.
List< Int64 > GetTrixels (Markup kind)
 Get the covering as list of trixels the machine in the current state.
List< Int64Pair > GetPairs (Markup kind)
 Get the covering as a list of level 20 HtmID (start, end) pairs from the machine in the current state.
List< Int64AugPair > GetTriples (Markup kind)
 Get the covering as a list of level 20 HtmID (start, end, flag) triples from the current state of the machine.

Static Public Member Functions

static List< Int64 > HidList (Region reg)
 Convenience wrapper for a one step cover generation.
static List< Int64AugPair > HidAugRange (Region reg)
 Create augmented range list (3rd column flags partial or inner).
static List< Int64Pair > HidRange (Region reg)
 Get range of outer HtmIDs.
static Int64 PseudoArea (Int64 hid)
 Compute the PseudoArea (number of level 20 trixels) of the given trixel.
static Int64 PseudoArea (Hidranges it)
 Compute the PseudoArea (number of level 20 trixels) of the given region.

Properties

Spherical.Region GetRegion [get]
 Get the Region object associated with this Cover.
int GetLevel [get]
 Return the current level of trixels in the current state of the covering. Levels run from 0 to 24.
int GetMaxLevel [get]
 Get the current maximum level in effect.


Detailed Description

Cover provides static (a) methods to generate trixel coverings of regions.

A covering can be extracted as a list of trixels, or lists of HtmID (start, end) pairs. In the latter case, the HtmIDs are always for level 20 trixels. The trixels making up the covering are either "inner" or "partial". Inner trixels are completely contained in the region. Partial trixels intersect the boundary of the region. Partial trixels follow the outline(s) of the region. The "outer" cover is the union of "inner" and "partial" covers. Each covering has an associated "cost," which is currently the number of (start, end) HtmID range pairs in the outer cover. The cost is used to deciding to terminate the search.

The Cover object uses an internal "machine" that computes the covering. The machine runs in stages, each successive step generates a finer resolution covering. Each step increases the depth of the partial trixels in the covering.


Constructor & Destructor Documentation

Spherical.Htm.Cover.Cover ( Spherical.Region  reg  ) 

Create a Cover object with the given Region, and initialize the internal cover machine.

Parameters:
reg Region object for which a trixel covering will be generated


Member Function Documentation

void Spherical.Htm.Cover.Init ( Spherical.Region  r  ) 

Initialize internals.

Parameters:
r 

Int64 Spherical.Htm.Cover.GetPseudoArea ( Markup  kind  ) 

Compute the pseudoare of selected part of the covering.

Parameters:
kind One of {Inner, Outer, Partial}
Returns:

int Spherical.Htm.Cover.Cost (  ) 

Compute the cost in resources in the current state of the Cover object.

Returns:
the cost

void Spherical.Htm.Cover.SetTunables ( int  minr,
int  maxr,
int  maxl 
)

Change the tunable parameters for the generation of the covering.

Parameters:
minr Minimum number of ranges
maxr Maximum number of ranges
maxl Maximum level number (to stop runaway searches)

void Spherical.Htm.Cover.Run (  ) 

Run this cover machine until completion.

void Spherical.Htm.Cover.Step (  ) 

Step this machine to the next level.

int Spherical.Htm.Cover.One (  ) 

The One function.

Returns:
1

static List<Int64> Spherical.Htm.Cover.HidList ( Region  reg  )  [static]

Convenience wrapper for a one step cover generation.

Parameters:
reg 
Returns:
list of (start, end) HtmID pairs of Outer trixels

static List<Int64AugPair> Spherical.Htm.Cover.HidAugRange ( Region  reg  )  [static]

Create augmented range list (3rd column flags partial or inner).

Parameters:
reg 
Returns:

static List<Int64Pair> Spherical.Htm.Cover.HidRange ( Region  reg  )  [static]

Get range of outer HtmIDs.

Parameters:
reg 
Returns:

static Int64 Spherical.Htm.Cover.PseudoArea ( Int64  hid  )  [static]

Compute the PseudoArea (number of level 20 trixels) of the given trixel.

Parameters:
hid The trixel's HtmID
Returns:
64-bit pseudoarea

static Int64 Spherical.Htm.Cover.PseudoArea ( Hidranges  it  )  [static]

Compute the PseudoArea (number of level 20 trixels) of the given region.

Parameters:
it Range containing HtmID (start,end) pairs
Returns:
64-bit pseudoarea

List<Int64> Spherical.Htm.Cover.GetTrixels ( Markup  kind  ) 

Get the covering as list of trixels the machine in the current state.

Parameters:
kind Inner, Outer or Partial
Returns:

List<Int64Pair> Spherical.Htm.Cover.GetPairs ( Markup  kind  ) 

Get the covering as a list of level 20 HtmID (start, end) pairs from the machine in the current state.

Parameters:
kind Inner, Outer or Partial
Returns:

List<Int64AugPair> Spherical.Htm.Cover.GetTriples ( Markup  kind  ) 

Get the covering as a list of level 20 HtmID (start, end, flag) triples from the current state of the machine.

The partial and inner trixels are separated. The flag indicates whether the (start, end) portion of the triple is from partial or inner trixels.

Parameters:
kind Inner, Outer or Partial
Returns:


Property Documentation

Spherical.Region Spherical.Htm.Cover.GetRegion [get]

Get the Region object associated with this Cover.

Returns:
the Region object

int Spherical.Htm.Cover.GetLevel [get]

Return the current level of trixels in the current state of the covering. Levels run from 0 to 24.

Returns:
level number

int Spherical.Htm.Cover.GetMaxLevel [get]

Get the current maximum level in effect.

Returns:
integer between 0 and 20, inclusive


The documentation for this class was generated from the following file:
May 27, 2007 György Fekete V 3.1.2