# Path: alfpy/utils/distance.py
# class Distance(object):
#     def __getitem__(self, seqnum):
#     def get_disttypes(cls):
#     def set_disttype(self, disttype):
#     def __init__(self, vector, disttype):
#     def pwdist_euclid_squared(self, seq1idx, seq2idx):
#     def pwdist_euclid_norm(self, seq1idx, seq2idx):
#     def pwdist_google(self, seq1idx, seq2idx):


import math
import numpy as np
from .utils import distance
    from .utils.seqrecords import main as main1
    from .word_vector import main as main2
    from .utils import distmatrix
The following code is inspired by, and was created based on, an excellent
Python code `decaf+py` (http://bioinformatics.org.au/tools/decaf+py/)
originally published in:

    1. Hohl and Ragan. (2007) Systematic Biology. 56. 2007. p. 206-221
       doi: 10.1080/10635150701294741.
    2. Hohl, Rigoutsos, Ragan (2006) Evol Bioinform Online 2: 359-375.
       doi: 10.1080/10635150701294741.

"""




def geometric_mean(values):
    """Calculate geometric mean in numpy array.

    Avoids numerical over- and underflow at the cost of compute time.

    Args:
        values (ndarray)
    Returns:
        float

    """
    inv_len = 1.0 / values.size
    x = values**inv_len
    return x.prod()



# Path: alfpy/utils/distance.py
# class Distance(object):
#     def __getitem__(self, seqnum):
#     def get_disttypes(cls):
#     def set_disttype(self, disttype):
#     def __init__(self, vector, disttype):
#     def pwdist_euclid_squared(self, seq1idx, seq2idx):
#     def pwdist_euclid_norm(self, seq1idx, seq2idx):
#     def pwdist_google(self, seq1idx, seq2idx):


# Path: alfpy/word_distance.py
import math
import numpy as np
from .utils import distance
    from .utils.seqrecords import main as main1
    from .word_vector import main as main2
    from .utils import distmatrix

The following code is inspired by, and was created based on, an excellent
Python code `decaf+py` (http://bioinformatics.org.au/tools/decaf+py/)
originally published in:

    1. Hohl and Ragan. (2007) Systematic Biology. 56. 2007. p. 206-221
       doi: 10.1080/10635150701294741.
    2. Hohl, Rigoutsos, Ragan (2006) Evol Bioinform Online 2: 359-375.
       doi: 10.1080/10635150701294741.

"""




def geometric_mean(values):
    """Calculate geometric mean in numpy array.

    Avoids numerical over- and underflow at the cost of compute time.

    Args:
        values (ndarray)
    Returns:
        float

    """
    inv_len = 1.0 / values.size
    x = values**inv_len
    return x.prod()



class Distance(distance.Distance):