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. |
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.
Spherical.Htm.Cover.Cover | ( | Spherical.Region | reg | ) |
Create a Cover object with the given Region, and initialize the internal cover machine.
reg | Region object for which a trixel covering will be generated |
void Spherical.Htm.Cover.Init | ( | Spherical.Region | r | ) |
Initialize internals.
r |
Int64 Spherical.Htm.Cover.GetPseudoArea | ( | Markup | kind | ) |
Compute the pseudoare of selected part of the covering.
kind | One of {Inner, Outer, Partial} |
int Spherical.Htm.Cover.Cost | ( | ) |
void Spherical.Htm.Cover.SetTunables | ( | int | minr, | |
int | maxr, | |||
int | maxl | |||
) |
Change the tunable parameters for the generation of the covering.
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.
static List<Int64> Spherical.Htm.Cover.HidList | ( | Region | reg | ) | [static] |
Convenience wrapper for a one step cover generation.
reg |
static List<Int64AugPair> Spherical.Htm.Cover.HidAugRange | ( | Region | reg | ) | [static] |
Create augmented range list (3rd column flags partial or inner).
reg |
static List<Int64Pair> Spherical.Htm.Cover.HidRange | ( | Region | reg | ) | [static] |
Get range of outer HtmIDs.
reg |
static Int64 Spherical.Htm.Cover.PseudoArea | ( | Int64 | hid | ) | [static] |
Compute the PseudoArea (number of level 20 trixels) of the given trixel.
hid | The trixel's HtmID |
static Int64 Spherical.Htm.Cover.PseudoArea | ( | Hidranges | it | ) | [static] |
Compute the PseudoArea (number of level 20 trixels) of the given region.
it | Range containing HtmID (start,end) pairs |
List<Int64> Spherical.Htm.Cover.GetTrixels | ( | Markup | kind | ) |
Get the covering as list of trixels the machine in the current state.
kind | Inner, Outer or Partial |
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.
kind | Inner, Outer or Partial |
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.
kind | Inner, Outer or Partial |
Spherical.Region Spherical.Htm.Cover.GetRegion [get] |
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.
int Spherical.Htm.Cover.GetMaxLevel [get] |
Get the current maximum level in effect.