Skip to content

Instantly share code, notes, and snippets.

View brandoninvergo's full-sized avatar

Brandon Invergo brandoninvergo

View GitHub Profile
@brandoninvergo
brandoninvergo / gist:1854574
Created February 17, 2012 17:46 — forked from dalloliogm/gist:1854319
generate Hamming graph H(n, 2)
#!/usr/bin/env python
"""
Generate a Hamming Graph
"""
import networkx
import logging
def hamming_binary(chromosome_len):
"""Generate a binary Hamming Graph, where each genotype is composed by chromosome_len bases and each base can take only two values. H(chromosome_len, 2).