func (l *LatticeLinkIter) Close() {
	pocketsphinx.LatlinkIterFree((*pocketsphinx.LatlinkIter)(l))
}
Close stops the iteration over links.
package sphinx
import (
	"fmt"
	"github.com/xlab/pocketsphinx-go/pocketsphinx"
)
type Lattice struct {
	lat *pocketsphinx.Lattice
}
type LatticeLink pocketsphinx.Latlink
type LatticeLinkIter pocketsphinx.LatlinkIter
type LatticeNode pocketsphinx.Latnode
type LatticeNodeIter pocketsphinx.LatnodeIter
func (d *Decoder) NewLattice(filename String) (*Lattice, error) {
	lat := pocketsphinx.LatticeRead(d.dec, filename.S())
	if lat == nil {
		err := fmt.Errorf("sphinx: failed to load lattice from %s", filename)
		return nil, err
	}
	l := &Lattice{
		lat: lat,
	}
	return l, nil
}
func (l *Lattice) Lattice() *pocketsphinx.Lattice {
	return pocketsphinx.LatticeRetain(l.lat)
}
func (l *Lattice) Retain() {
	l.lat = pocketsphinx.LatticeRetain(l.lat)
}
func (l *Lattice) Destroy() bool {
	if l.lat != nil {
		ret := pocketsphinx.LatticeFree(l.lat)
		l.lat = nil
		return ret == 0
	}
	return true
}
func (l *Lattice) WriteTo(filename String) bool {
	ret := pocketsphinx.LatticeWrite(l.lat, filename.S())
	return ret == 0
}
func (l *Lattice) WriteToHTK(filename String) bool {
	ret := pocketsphinx.LatticeWriteHtk(l.lat, filename.S())
	return ret == 0
}
func (l *Lattice) LogMath() *LogMath {
	m := pocketsphinx.LatticeGetLogmath(l.lat)
	return &LogMath{
		m: m,
	}
}
func (l Lattice) Iter() *LatticeNodeIter {
	iter := pocketsphinx.GetLatnodeIter(l.lat)
	return (*LatticeNodeIter)(iter)
}
func (l *LatticeNodeIter) Next() *LatticeNodeIter {
	iter := pocketsphinx.LatnodeIterNext((*pocketsphinx.LatnodeIter)(l))
	return (*LatticeNodeIter)(iter)
}
func (l *LatticeNodeIter) Close() {
	it := (*pocketsphinx.LatnodeIter)(l)
	pocketsphinx.LatnodeIterFree(it)
}
func (l *LatticeNodeIter) Node() *LatticeNode {
	it := (*pocketsphinx.LatnodeIter)(l)
	node := pocketsphinx.LatnodeIterNode(it)
	return (*LatticeNode)(node)
}
func (l *LatticeNode) Times() (start int32, first, last int16) {
	start = pocketsphinx.LatnodeTimes((*pocketsphinx.Latnode)(l), &first, &last)
	return
}
func (l *Lattice) Word(node *LatticeNode) string {
	return pocketsphinx.LatnodeWord(l.lat, (*pocketsphinx.Latnode)(node))
}
func (l *Lattice) BaseWord(node *LatticeNode) string {
	return pocketsphinx.LatnodeBaseword(l.lat, (*pocketsphinx.Latnode)(node))
}
func (l *LatticeNode) Exits() *LatticeLinkIter {
	iter := pocketsphinx.LatnodeExits((*pocketsphinx.Latnode)(l))
	return (*LatticeLinkIter)(iter)
}
func (l *LatticeNode) Entries() *LatticeLinkIter {
	iter := pocketsphinx.LatnodeEntries((*pocketsphinx.Latnode)(l))
	return (*LatticeLinkIter)(iter)
}