Documentation ¶
Overview ¶
===== Copyright 2016, Webpraxis Consulting Ltd. - ALL RIGHTS RESERVED - Email: webpraxis@gmail.com ===========================
- Package octree:
- import "octree"
- Overview:
- package for creating, reporting, importing, exporting and querying point-region octrees.
- Types:
- DataCoords
- Array for a data point's R^3 coordinates, i.e., [1.,2.,3.]
- DataSet
- Map for the R^3 data points keyed on identifiers, i.e., "Pt1":[1.,2.,3.], "Pt2":[4.,5.,6.], etc.
- Variables:
- MaxIterations
- Maxinum number of iterations for the geometric-median partition method
- Tol
- Convergence tolerance for the geometric-median partition method
- Functions:
- Export(file string, compact bool)
- Exports the octree and its meta data to a specified file using the JSON format with or without newlines
- and identations.
- Histogram(plotWidth, plotHeight int, pngFile string)
- Plots a histogram of the leaf point counts and saves it to the specified PNG file.
- The population mean (mu) and standard deviation (sigma) of the leaf counts are also illustrated.
- Import(file string)
- Imports an octree and its meta data from a specified JSON file.
- Make(method string, terminal_N int, refPoints *DataSet)
- Creates a point-region octree recursively using a specified partitioning method and termination criterion.
- Query(refQueryPt *DataCoords) string
- Traverses an octree top-down to get the data keys at the leaf node corresponding to the octant in
- which lies the specified query point.
- Summarize(output ...string)
- Outputs the meta data and various statistics regarding the octree to a specified file or Stdout.
- History:
- v1.0.0 - October 26, 2016 - Original release. *============================================================================================================================
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MaxIterations = 1000 //max no of iterations for the geometric-median method of partitioning Tol = 1.0E-12 //convergence tolerance for the geometric-median method of partitioning )
Functions ¶
func Query ¶
func Query(refQueryPt *DataCoords) string
Types ¶
type DataCoords ¶
type DataCoords [3]float64 //array for a data point's R^3 coordinates
Exported ---------------------------------------------------------------------------------------------------------------------
type DataSet ¶
type DataSet map[string]DataCoords //map for the R^3 data points keyed on identifiers
Exported ---------------------------------------------------------------------------------------------------------------------
Click to show internal directories.
Click to hide internal directories.