func NewGenomeReader(r io.Reader, encoding GenomeEncoding) (GenomeReader, error) {
	switch encoding {
	case PlainGenomeEncoding:
		return &plainGenomeReader{r: bufio.NewReader(r)}, nil
	case YAMLGenomeEncoding:
		return &yamlGenomeReader{r: bufio.NewReader(r)}, nil
	default:
		return nil, ErrUnsupportedGenomeEncoding
	}
}
NewGenomeReader Creates reader for Genome data with specified encoding format.
package genetics
import (
	"bufio"
	"errors"
	"fmt"
	"github.com/spf13/cast"
	"github.com/yaricom/goNEAT/v2/neat"
	"github.com/yaricom/goNEAT/v2/neat/math"
	"github.com/yaricom/goNEAT/v2/neat/network"
	"gopkg.in/yaml.v3"
	"io"
	"strconv"
	"strings"
)
type GenomeReader interface {
	Read() (*Genome, error)
}