# Path: alfpy/lempelziv.py
# def complexity(s):
# def complexity1(seq):
# def is_reproducible(seq, index, hist_len, last_match=0):
#     def __init__(self, seq_records, disttype='d1_star'):
#     def __precompute_complexity(self):
#     def __get_complexity(self, seq1idx, seq2idx):
#     def pwdist_d(self, seq1idx, seq2idx):
#     def pwdist_d_star(self, seq1idx, seq2idx):
#     def pwdist_d1(self, seq1idx, seq2idx):
#     def pwdist_d1_star(self, seq1idx, seq2idx):
#     def pwdist_d1_star2(self, seq1idx, seq2idx):
#     def set_disttype(self, disttype):
# def main():
# class Distance:
# 
# Path: alfpy/utils/distmatrix.py
# def create(id_list, distance):
# def read_highcharts_matrix(id_list, data):
#     def __init__(self, id_list, data):
#     def normalize(self):
#     def __iter__(self):
#     def writer(self, handle, f, decimal_places):
#     def display(self, f="phylip", decimal_places=7):
#     def write_to_file(self, handle, f="phylip", decimal_places=7):
#     def highcharts(self):
#     def format(self, decimal_places=7):
#     def min(self):
#     def max(self):
#     def is_zero(self):
#     def __repr__(self):
# class Matrix():


import unittest
from alfpy import lempelziv
from alfpy.utils import distmatrix
from . import utils
            "seq2       9 0 10 18",
            "seq3       15 10 0 17",
            "seq4       20 18 17 0"
        ]
        self.assertEqual(matrix.format(decimal_places=0), "\n".join(exp))

    def test_distance_d_star(self):
        self.dist.set_disttype('d_star')
        matrix = distmatrix.create(self.pep_records.id_list, self.dist)
        exp = [
            "   4",
            "seq1       0.0000000 0.2250000 0.3750000 0.5000000",
            "seq2       0.2250000 0.0000000 0.2631579 0.4736842",
            "seq3       0.3750000 0.2631579 0.0000000 0.4857143",
            "seq4       0.5000000 0.4736842 0.4857143 0.0000000"
        ]
        self.assertEqual(matrix.format(), "\n".join(exp))

    def test_distance_d1(self):
        self.dist.set_disttype('d1')
        matrix = distmatrix.create(self.pep_records.id_list, self.dist)
        exp = [
            "   4",
            "seq1       0 16 28 23",
            "seq2       16 0 19 21",
            "seq3       28 19 0 19",
            "seq4       23 21 19 0"
        ]
        self.assertEqual(matrix.format(0), "\n".join(exp))


# Path: alfpy/lempelziv.py
# def complexity(s):
# def complexity1(seq):
# def is_reproducible(seq, index, hist_len, last_match=0):
#     def __init__(self, seq_records, disttype='d1_star'):
#     def __precompute_complexity(self):
#     def __get_complexity(self, seq1idx, seq2idx):
#     def pwdist_d(self, seq1idx, seq2idx):
#     def pwdist_d_star(self, seq1idx, seq2idx):
#     def pwdist_d1(self, seq1idx, seq2idx):
#     def pwdist_d1_star(self, seq1idx, seq2idx):
#     def pwdist_d1_star2(self, seq1idx, seq2idx):
#     def set_disttype(self, disttype):
# def main():
# class Distance:
# 
# Path: alfpy/utils/distmatrix.py
# def create(id_list, distance):
# def read_highcharts_matrix(id_list, data):
#     def __init__(self, id_list, data):
#     def normalize(self):
#     def __iter__(self):
#     def writer(self, handle, f, decimal_places):
#     def display(self, f="phylip", decimal_places=7):
#     def write_to_file(self, handle, f="phylip", decimal_places=7):
#     def highcharts(self):
#     def format(self, decimal_places=7):
#     def min(self):
#     def max(self):
#     def is_zero(self):
#     def __repr__(self):
# class Matrix():


# Path: tests/test_lempelziv.py
import unittest
from alfpy import lempelziv
from alfpy.utils import distmatrix
from . import utils

            "seq2       9 0 10 18",
            "seq3       15 10 0 17",
            "seq4       20 18 17 0"
        ]
        self.assertEqual(matrix.format(decimal_places=0), "\n".join(exp))

    def test_distance_d_star(self):
        self.dist.set_disttype('d_star')
        matrix = distmatrix.create(self.pep_records.id_list, self.dist)
        exp = [
            "   4",
            "seq1       0.0000000 0.2250000 0.3750000 0.5000000",
            "seq2       0.2250000 0.0000000 0.2631579 0.4736842",
            "seq3       0.3750000 0.2631579 0.0000000 0.4857143",
            "seq4       0.5000000 0.4736842 0.4857143 0.0000000"
        ]
        self.assertEqual(matrix.format(), "\n".join(exp))

    def test_distance_d1(self):
        self.dist.set_disttype('d1')
        matrix = distmatrix.create(self.pep_records.id_list, self.dist)
        exp = [
            "   4",
            "seq1       0 16 28 23",
            "seq2       16 0 19 21",
            "seq3       28 19 0 19",
            "seq4       23 21 19 0"
        ]
        self.assertEqual(matrix.format(0), "\n".join(exp))


    def test_distance_d1_star(self):