Database files renamed
This commit is contained in:
@ -20,11 +20,11 @@ from crossover import Crossover_Methods
|
||||
from attributes import Attributes
|
||||
|
||||
# Database class
|
||||
from database import database
|
||||
from database import sql_database
|
||||
from sqlite3 import Error
|
||||
|
||||
# Graphing package
|
||||
from database import graph
|
||||
from database import matplotlib_graph
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
|
||||
@ -21,11 +21,11 @@ from mutation import Mutation_Methods
|
||||
from crossover import Crossover_Methods
|
||||
|
||||
# Database class
|
||||
from database import database
|
||||
from database import sql_database
|
||||
from sqlite3 import Error
|
||||
|
||||
# Graphing package
|
||||
from database import graph
|
||||
from database import matplotlib_graph
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ class Attributes:
|
||||
mutation_individual_impl = Mutation_Methods.Individual.single_gene,
|
||||
mutation_population_impl = Mutation_Methods.Population.random_selection,
|
||||
termination_impl = Termination_Methods.fitness_and_generation_based,
|
||||
Database = database.Database,
|
||||
Database = sql_database.SQL_Database,
|
||||
database_name = 'database.db',
|
||||
sql_create_data_structure = """CREATE TABLE IF NOT EXISTS data (
|
||||
id integer PRIMARY KEY,
|
||||
@ -71,7 +71,7 @@ class Attributes:
|
||||
fitness DOUBLE,
|
||||
chromosome text
|
||||
); """,
|
||||
Graph = graph.Graph
|
||||
Graph = matplotlib_graph.Matplotlib_Graph
|
||||
):
|
||||
|
||||
# Initilization variables
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
# Graphing package
|
||||
import matplotlib.pyplot as plt
|
||||
# Database class
|
||||
from database import database
|
||||
from sqlite3 import Error
|
||||
|
||||
class Graph:
|
||||
class Matplotlib_Graph:
|
||||
"""Prebuilt graphing functions to make visual represention of fitness data."""
|
||||
|
||||
|
||||
@ -3,9 +3,9 @@ from sqlite3 import Error
|
||||
import os
|
||||
|
||||
|
||||
class Database:
|
||||
class SQL_Database:
|
||||
"""Main database class that controls all the functionality for input /
|
||||
out of the database."""
|
||||
out of the database using SQLite3."""
|
||||
|
||||
|
||||
def __init__(self):
|
||||
Reference in New Issue
Block a user