Documentation
¶
Overview ¶
package main
package main
package main
package main
package main
package main
package main
package main
package main
package main
package main
Index ¶
- Constants
- Variables
- func BytesFromFinalOverflowIntermediate(fofsi FinalOverflowIntermediate) []byte
- func BytesFromHeaderIntermediate(hdri HeaderIntermediate) []byte
- func BytesFromLoqIntermediate(loqi LoqIntermediate) []byte
- func BytesFromOverflowIntermediate(ofsi OverflowIntermediate) []byte
- func BytesFromPathIntermediate(pathi PathIntermediate) []byte
- func CGFBegPeel(cgf_bytes []byte) (magic uint64, cgfver []byte, libver []byte, path_n uint64, tmap_len uint64, ...)
- func CGFDefaultHeaderBytes() []byte
- func CGFDefaultTileMap() []byte
- func CGFFillHeader(cgf *CGF, b []byte) int
- func CGFLibraryVersion(cgf_bytes []byte) string
- func CGFMagic(cgf_bytes []byte) uint64
- func CGFPathBytes(cgf_bytes []byte, path int) ([]byte, error)
- func CGFPathCount(cgf_bytes []byte) int
- func CGFTilemapBytes(cgf_bytes []byte) ([]byte, error)
- func CGFVectorUint64(cgf_bytes []byte, path int) ([]uint64, error)
- func CGFVersion(cgf_bytes []byte) string
- func CGLFGetLibSeq(path, step, varid, span uint64, cglf_path string) string
- func CacheMapVal(vec_val uint64, offset uint) int
- func CountOverflow(cgf_bytes []byte, path, start_step, end_step int) (int, error)
- func CountOverflowVectorUint64(vec []uint64, start_step, end_step int) int
- func CountOverflow_old(cgf_bytes []byte, path, start_step, step int) (int, error)
- func CreateCGFBytes(ctx *CGFContext) []byte
- func DebugRead(ifn string) error
- func FillNocSeq(seq string, delpos_len []int) string
- func FinalOverflowIntermediateCmp(fofsi0, fofsi1 FinalOverflowIntermediate) error
- func GetKnot(tilemap []TileMapEntry, pathi PathIntermediate, anchor_step int) [][]TileInfo
- func GetSimpleTileMapEntry(tilemap []TileMapEntry, pathi PathIntermediate, anchor_step int) (int, bool, bool, bool)
- func HeaderIntermediateAddPath(hdri *HeaderIntermediate, path int, PathBytes []byte)
- func HeaderIntermediateCmp(hdri0, hdri1 HeaderIntermediate) error
- func HeaderIntermediateDebugPrint(hdri HeaderIntermediate)
- func LoadSampleFastj(scan *autoio.AutoioHandle) ([][]TileInfo, error)
- func LookupTileMap(cgf_bytes []byte, path, ver, step int) (int, error)
- func LoqIntermediateCmp(loqi0, loqi1 LoqIntermediate) error
- func Md5sum2str(md5sum [16]byte) string
- func OverflowIntermediateCmp(ofsi0, ofsi1 OverflowIntermediate) error
- func Ovf_b(path_bytes []byte, step_idx int) []byte
- func ParseTilepos(s string) (path, ver, step int, err error)
- func PathBegInfo(path_bytes []byte) ([]byte, uint64, []byte, uint64)
- func PathFinalOverflowFastJFromBytes(fin_ovf_bytes []byte, step int) string
- func PathFinalOverflowKnotFromBytes(rec_n uint64, fin_ovf_bytes []byte, step uint64) (knot_zipper [][]int)
- func PathFinalOverflowPeel(fin_ovf_bytes []byte) (fin_ovf_rec_n uint64, fin_ovf_rec_byte_len uint64, fin_ovf_rec_bytes []byte, ...)
- func PathLowQualityKnotZipper(loq_info_bytes []byte, anchor_step uint64) [][][]int
- func PathLowQualityPeel(loq_info_bytes []byte) (loq_count uint64, loq_code uint64, loq_stride uint64, loq_offset_bytes []byte, ...)
- func PathOverflowAdd(overflow *OverflowStruct, overflow_count, anchor_step, tilemap_pos int)
- func PathOverflowBytes(path_bytes []byte, path int) ([]byte, error)
- func PathOverflowOffsetUint64(path_bytes []byte) []uint64
- func PathOverflowPeel(ovf_bytes []byte) (ovf_len uint64, ovf_stride uint64, ovf_mbc uint64, ovf_off_b []byte, ...)
- func PathOverflowPositionUint64(path_bytes []byte) []uint64
- func PathOvfPeel(ovf_bytes []byte) (uint64, uint64, uint64, []byte, []byte, []byte, uint64)
- func Peel(cgf_bytes []byte, path, step int)
- func PopulateSGLFFromCGLF(cglf_path string, sglf *cglf.SGLF, path uint64) error
- func PrintHeaderInfo(cgf *CGF)
- func PrintKnotFastjSGLF(knot [][]TileInfo, sglf cglf.SGLF, path, ver uint64, hdri HeaderIntermediate)
- func PrintTileCGLF(cgf_fn string, tilepos string, cglf_path string) error
- func PrintTileMapInfo(cgf *CGF)
- func PrintTileSGLF(cgf_fn string, tilepos string, sglf cglf.SGLF) error
- func RelativeOvfCount(vec_bytes []byte, step_start, step_end uint64) (ovf_count int)
- func VectorElementOverflowCount(prep_vector []VectorElement, st, n int) int
- func WriteCGFBytes(cgf_bytes []byte, ofn string) error
- func WriteCGFFromIntermediate(ofn string, hdri *HeaderIntermediate)
- type CGF
- type CGFContext
- func (ctx *CGFContext) ConstructFinalOffsetIntermediate(prep_vector []VectorElement) FinalOverflowIntermediate
- func (ctx *CGFContext) ConstructLoqIntermediate(prep_vector []VectorElement) LoqIntermediate
- func (ctx *CGFContext) ConstructOffsetIntermediate(prep_vector []VectorElement) OverflowIntermediate
- func (ctx *CGFContext) ConstructTileMapLookup()
- func (ctx *CGFContext) ConstructUint64Vector(prep_vector []VectorElement) []uint64
- func (ctx *CGFContext) EmitPathBytes(path_idx int, allele_path [][]TileInfo) ([]byte, error)
- func (ctx *CGFContext) UpdateVectorPathSimple(path_idx int, allele_path [][]TileInfo) error
- func (ctx *CGFContext) WriteCGF(ofn string) error
- type CGFIntermediate
- type DataRecordStruct
- type FinalOverflowIntermediate
- type FinalOverflowStruct
- type HeaderIntermediate
- type LoqAlleleInfoStruct
- type LoqHetHomInfoStruct
- type LoqInfoStruct
- type LoqIntermediate
- type LowQualityHetStruct
- type LowQualityHomStruct
- type LowQualityInfoStruct
- type OverflowIntermediate
- type OverflowStruct
- type PathIntermediate
- type PathOverflowStruct
- type PathStruct
- type TileInfo
- type TileMapEntry
- type VectorElement
Constants ¶
const CGF_DEFAULT_LIBRARY_FILE string = "default_tile_map_v0.1.0.txt"
const CGF_DEFAULT_LIBRARY_VERSION string = "0.1.0"
Variables ¶
var CGF_MAGIC []byte = []byte{'"', 'c', 'g', 'f', '.', 'b', '"', '{'}
const CGF_MAGIC uint64 = 0x7b226367662e6222
var DEFAULT_TILEMAP []string = []string{}/* 1024 elements not displayed */
var VERSION_STR string = "0.2.3"
Functions ¶
func BytesFromFinalOverflowIntermediate ¶
func BytesFromFinalOverflowIntermediate(fofsi FinalOverflowIntermediate) []byte
func BytesFromHeaderIntermediate ¶
func BytesFromHeaderIntermediate(hdri HeaderIntermediate) []byte
func BytesFromLoqIntermediate ¶
func BytesFromLoqIntermediate(loqi LoqIntermediate) []byte
func BytesFromOverflowIntermediate ¶
func BytesFromOverflowIntermediate(ofsi OverflowIntermediate) []byte
func BytesFromPathIntermediate ¶
func BytesFromPathIntermediate(pathi PathIntermediate) []byte
func CGFBegPeel ¶
func CGFDefaultHeaderBytes ¶
func CGFDefaultHeaderBytes() []byte
func cgf_default_header_bytes() []byte {
func CGFDefaultTileMap ¶
func CGFDefaultTileMap() []byte
No path structures, so some arrays are of 0 length
func cgf_default_tile_map() []byte {
func CGFFillHeader ¶
func fill_header_struct_from_bytes(cgf *CGF, b []byte) {
func CGFLibraryVersion ¶
func CGFPathCount ¶
func CGFTilemapBytes ¶
func CGFVersion ¶
func CGLFGetLibSeq ¶
bootstrap. We will replace this with a more efficient lookup
func cglf_get_lib_seq(path, step, varid, span uint64, cglf_path string) string {
func CacheMapVal ¶
func CountOverflow ¶
func CountOverflowVectorUint64 ¶
Count number of actual overflow entries. This is needed for the overflow tables.
Entries that appear in the local hexit cache won't be counted unless they're greater than 0xd.
func CountOverflow_old ¶
start_step is inclusive, end step is exclusive
func CreateCGFBytes ¶
func CreateCGFBytes(ctx *CGFContext) []byte
ctx holds the populated CGF structure along with a filled in SGLF structure, populated TileMapArray and the variaous TileMapLookup and TileMapPosition.
This returns the raw bytes as they're to be stored on disk (or in memory presumably).
func create_cgf_bytes(ctx *CGFContext) []byte {
func FillNocSeq ¶
func fill_noc_seq(seq string, delpos_len []int) string {
func FinalOverflowIntermediateCmp ¶
func FinalOverflowIntermediateCmp(fofsi0, fofsi1 FinalOverflowIntermediate) error
func finaloverflowintermediate_cmp(fofsi0, fofsi1 finaloverflowintermediate) error {
func GetKnot ¶
func GetKnot(tilemap []TileMapEntry, pathi PathIntermediate, anchor_step int) [][]TileInfo
func get_knot(tilemap []TileMapEntry, pathi pathintermediate, anchor_step int) [][]TileInfo {
func GetSimpleTileMapEntry ¶
func GetSimpleTileMapEntry(tilemap []TileMapEntry, pathi PathIntermediate, anchor_step int) (int, bool, bool, bool)
func GetKnot(tilemap []TileMapEntry, pathi PathIntermediate, anchor_step int) (tilemap int, is_span bool, is_loq bool, is_complex bool) {
func HeaderIntermediateAddPath ¶
func HeaderIntermediateAddPath(hdri *HeaderIntermediate, path int, PathBytes []byte)
func headerintermediate_add_path(hdri *headerintermediate, path int, PathBytes []byte) {
func HeaderIntermediateCmp ¶
func HeaderIntermediateCmp(hdri0, hdri1 HeaderIntermediate) error
func HeaderIntermediateDebugPrint ¶
func HeaderIntermediateDebugPrint(hdri HeaderIntermediate)
func headerintermediate_debug_print(hdri headerintermediate) {
func LoadSampleFastj ¶
func LoadSampleFastj(scan *autoio.AutoioHandle) ([][]TileInfo, error)
func LoqIntermediateCmp ¶
func LoqIntermediateCmp(loqi0, loqi1 LoqIntermediate) error
func Md5sum2str ¶
func OverflowIntermediateCmp ¶
func OverflowIntermediateCmp(ofsi0, ofsi1 OverflowIntermediate) error
func ParseTilepos ¶
func parse_tilepos(s string) (path, ver, step int, err error) {
func PathFinalOverflowPeel ¶
func PathLowQualityPeel ¶
func PathOverflowAdd ¶
func PathOverflowAdd(overflow *OverflowStruct, overflow_count, anchor_step, tilemap_pos int)
func PathOverflowPeel ¶
func PathOvfPeel ¶
func PopulateSGLFFromCGLF ¶
func populate_sglf_from_cglf(cglf_path string, sglf *SGLF, path uint64) error {
func PrintKnotFastjSGLF ¶
func PrintKnotFastjSGLF(knot [][]TileInfo, sglf cglf.SGLF, path, ver uint64, hdri HeaderIntermediate)
func print_knot_fastj_sglf(knot [][]TileInfo, sglf SGLF, path, ver uint64, hdri headerintermediate) {
func PrintTileSGLF ¶
func print_tile_sglf(cgf_fn string, tilepos string, sglf SGLF) error {
func RelativeOvfCount ¶
Count overflow entries from step_start to step_end (inclusive)
Broadly, there are two conditions where it could overflow:
- The cached value is an overflow value (either low or high quality)
- The number of non canonical entries exceed the cache size
func VectorElementOverflowCount ¶
func VectorElementOverflowCount(prep_vector []VectorElement, st, n int) int
func WriteCGFBytes ¶
func write_cgf_bytes(cgf_bytes []byte, ofn string) error {
func WriteCGFFromIntermediate ¶
func WriteCGFFromIntermediate(ofn string, hdri *HeaderIntermediate)
func write_cgf_from_intermediate(ofn string, hdri *HeaderIntermediate) {
Types ¶
type CGFContext ¶
type CGFContext struct { CGF *CGF //SGLF *SGLF SGLF *cglf.SGLF TileMapArray []TileMapEntry TileMapLookup map[string]TileMapEntry TileMapPosition map[string]int }
func (*CGFContext) ConstructFinalOffsetIntermediate ¶
func (ctx *CGFContext) ConstructFinalOffsetIntermediate(prep_vector []VectorElement) FinalOverflowIntermediate
func (*CGFContext) ConstructLoqIntermediate ¶
func (ctx *CGFContext) ConstructLoqIntermediate(prep_vector []VectorElement) LoqIntermediate
func (*CGFContext) ConstructOffsetIntermediate ¶
func (ctx *CGFContext) ConstructOffsetIntermediate(prep_vector []VectorElement) OverflowIntermediate
func (*CGFContext) ConstructTileMapLookup ¶
func (ctx *CGFContext) ConstructTileMapLookup()
func CGFContext_construct_tilemap_lookup(ctx *CGFContext) {
func (*CGFContext) ConstructUint64Vector ¶
func (ctx *CGFContext) ConstructUint64Vector(prep_vector []VectorElement) []uint64
func (*CGFContext) EmitPathBytes ¶
func (ctx *CGFContext) EmitPathBytes(path_idx int, allele_path [][]TileInfo) ([]byte, error)
func emit_intermediate(ctx *CGFContext, path_idx int, allele_path [][]TileInfo) error { func emit_PathBytes(ctx *CGFContext, path_idx int, allele_path [][]TileInfo) ([]byte, error) {
func (*CGFContext) UpdateVectorPathSimple ¶
func (ctx *CGFContext) UpdateVectorPathSimple(path_idx int, allele_path [][]TileInfo) error
Will overwrite cgf path structure if it exists, create a new path if it doesn't. It will create a new PathStruct if one doesn't already exist.
func update_vector_path_simple(ctx *CGFContext, path_idx int, allele_path [][]TileInfo) error {
func (*CGFContext) WriteCGF ¶
func (ctx *CGFContext) WriteCGF(ofn string) error
func write_cgf(ctx *CGFContext, ofn string) error {
type CGFIntermediate ¶
type DataRecordStruct ¶
type FinalOverflowIntermediate ¶
type FinalOverflowIntermediate struct {
// contains filtered or unexported fields
}
func FinalOverflowIntermediateFromBytes ¶
func FinalOverflowIntermediateFromBytes(b []byte) (FinalOverflowIntermediate, int)
type FinalOverflowStruct ¶
type FinalOverflowStruct struct { Length uint64 Stride uint64 Offset []uint64 Position []uint64 DataRecord DataRecordStruct }
type HeaderIntermediate ¶
type HeaderIntermediate struct { TileMap []TileMapEntry TileMapBytes []byte StepPerPath []int PathBytes [][]byte // contains filtered or unexported fields }
func HeaderIntermediateFromBytes ¶
func HeaderIntermediateFromBytes(b []byte) (HeaderIntermediate, int)
type LoqAlleleInfoStruct ¶
type LoqAlleleInfoStruct struct { NAllele []byte Allele []LoqInfoStruct }
type LoqHetHomInfoStruct ¶
type LoqHetHomInfoStruct struct {
AllelInfo [][]LoqInfoStruct
}
type LoqInfoStruct ¶
type LoqIntermediate ¶
type LoqIntermediate struct {
// contains filtered or unexported fields
}
func LoqIntermediateFromBytes ¶
func LoqIntermediateFromBytes(b []byte) (LoqIntermediate, int)
type LowQualityHetStruct ¶
type LowQualityHetStruct struct { Length uint64 Stride uint64 Offset []uint64 NTile []uint64 Info []LoqAlleleInfoStruct }
type LowQualityHomStruct ¶
type LowQualityHomStruct struct { Length uint64 Stride uint64 Offset []uint64 NTile []uint64 Info []LoqInfoStruct }
type LowQualityInfoStruct ¶
type OverflowIntermediate ¶
type OverflowIntermediate struct { TileMap []int // contains filtered or unexported fields }
func OverflowIntermediateFromBytes ¶
func OverflowIntermediateFromBytes(b []byte) (OverflowIntermediate, int)
type OverflowStruct ¶
type PathIntermediate ¶
type PathIntermediate struct { VecUint64 []uint64 // contains filtered or unexported fields }
func PathIntermediateFromBytes ¶
func PathIntermediateFromBytes(b []byte) (PathIntermediate, int)
type PathOverflowStruct ¶
type PathOverflowStruct struct { Length uint64 Stride uint64 Offset []uint64 Position []uint64 Map []byte IntMap []int }
func GetPathOverflow ¶
func GetPathOverflow(path_bytes []byte) PathOverflowStruct
type PathStruct ¶
type PathStruct struct { Name string Vector []uint64 Overflow OverflowStruct FinalOverflow FinalOverflowStruct LowQualityBytes []byte }
type TileMapEntry ¶
func LookupTileMapEntry ¶
func LookupTileMapEntry(cgf_bytes []byte, path, ver, step int) (TileMapEntry, error)
func UnpackTileMap ¶
func UnpackTileMap(tilemap_bytes []byte) []TileMapEntry
func unpack_tilemap(tilemap_bytes []byte) []TileMapEntry {
type VectorElement ¶
type VectorElement struct {
// contains filtered or unexported fields
}