def split_join_distance(comm1, comm2, remove_none=False):
    'Calculates the split-join distance between two community structures.\n\n    The split-join distance is a distance measure defined on the space of\n    partitions of a given set. It is the sum of the projection distance of\n    one partition from the other and vice versa, where the projection\n    number of A from B is if calculated as follows:\n\n      1. For each set in A, find the set in B with which it has the\n         maximal overlap, and take note of the size of the overlap.\n\n      2. Take the sum of the maximal overlap sizes for each set in A.\n\n      3. Subtract the sum from M{n}, the number of elements in the\n         partition.\n\n    Note that the projection distance is asymmetric, that\'s why it has to be\n    calculated in both directions and then added together.  This function\n    returns the projection distance of C{comm1} from C{comm2} and the\n    projection distance of C{comm2} from C{comm1}, and returns them in a pair.\n    The actual split-join distance is the sum of the two distances. The reason\n    why it is presented this way is that one of the elements being zero then\n    implies that one of the partitions is a subpartition of the other (and if\n    it is close to zero, then one of the partitions is close to being a\n    subpartition of the other).\n\n    @param comm1: the first community structure as a membership list or\n      as a L{Clustering} object.\n    @param comm2: the second community structure as a membership list or\n      as a L{Clustering} object.\n    @param remove_none: whether to remove C{None} entries from the membership\n      lists. This is handy if your L{Clustering} object was constructed using\n      L{VertexClustering.FromAttribute} using an attribute which was not defined\n      for all the vertices. If C{remove_none} is C{False}, a C{None} entry in\n      either C{comm1} or C{comm2} will result in an exception. If C{remove_none}\n      is C{True}, C{None} values are filtered away and only the remaining lists\n      are compared.\n\n    @return: the projection distance of C{comm1} from C{comm2} and vice versa\n      in a tuple. The split-join distance is the sum of the two.\n    @newfield ref: Reference\n    @ref: van Dongen D: Performance criteria for graph clustering and Markov\n          cluster experiments. Technical Report INS-R0012, National Research\n          Institute for Mathematics and Computer Science in the Netherlands,\n          Amsterdam, May 2000.\n\n    @see: L{compare_communities()} with C{method = "split-join"} if you are\n      not interested in the individual projection distances but only the\n      sum of them.\n    '
    import igraph._igraph
    (vec1, vec2) = _prepare_community_comparison(comm1, comm2, remove_none)
    return igraph._igraph._split_join_distance(vec1, vec2)
Calculates the split-join distance between two community structures.

The split-join distance is a distance measure defined on the space of
partitions of a given set. It is the sum of the projection distance of
one partition from the other and vice versa, where the projection
number of A from B is if calculated as follows:

  1. For each set in A, find the set in B with which it has the
     maximal overlap, and take note of the size of the overlap.

  2. Take the sum of the maximal overlap sizes for each set in A.

  3. Subtract the sum from M{n}, the number of elements in the
     partition.

Note that the projection distance is asymmetric, that's why it has to be
calculated in both directions and then added together.  This function
returns the projection distance of C{comm1} from C{comm2} and the
projection distance of C{comm2} from C{comm1}, and returns them in a pair.
The actual split-join distance is the sum of the two distances. The reason
why it is presented this way is that one of the elements being zero then
implies that one of the partitions is a subpartition of the other (and if
it is close to zero, then one of the partitions is close to being a
subpartition of the other).

@param comm1: the first community structure as a membership list or
  as a L{Clustering} object.
@param comm2: the second community structure as a membership list or
  as a L{Clustering} object.
@param remove_none: whether to remove C{None} entries from the membership
  lists. This is handy if your L{Clustering} object was constructed using
  L{VertexClustering.FromAttribute} using an attribute which was not defined
  for all the vertices. If C{remove_none} is C{False}, a C{None} entry in
  either C{comm1} or C{comm2} will result in an exception. If C{remove_none}
  is C{True}, C{None} values are filtered away and only the remaining lists
  are compared.

@return: the projection distance of C{comm1} from C{comm2} and vice versa
  in a tuple. The split-join distance is the sum of the two.
@newfield ref: Reference
@ref: van Dongen D: Performance criteria for graph clustering and Markov
      cluster experiments. Technical Report INS-R0012, National Research
      Institute for Mathematics and Computer Science in the Netherlands,
      Amsterdam, May 2000.

@see: L{compare_communities()} with C{method = "split-join"} if you are
  not interested in the individual projection distances but only the
  sum of them.
def split_join_distance(comm1, comm2, remove_none=False):
    'Calculates the split-join distance between two community structures.\n\n    The split-join distance is a distance measure defined on the space of\n    partitions of a given set. It is the sum of the projection distance of\n    one partition from the other and vice versa, where the projection\n    number of A from B is if calculated as follows:\n\n      1. For each set in A, find the set in B with which it has the\n         maximal overlap, and take note of the size of the overlap.\n\n      2. Take the sum of the maximal overlap sizes for each set in A.\n\n      3. Subtract the sum from M{n}, the number of elements in the\n         partition.\n\n    Note that the projection distance is asymmetric, that\'s why it has to be\n    calculated in both directions and then added together.  This function\n    returns the projection distance of C{comm1} from C{comm2} and the\n    projection distance of C{comm2} from C{comm1}, and returns them in a pair.\n    The actual split-join distance is the sum of the two distances. The reason\n    why it is presented this way is that one of the elements being zero then\n    implies that one of the partitions is a subpartition of the other (and if\n    it is close to zero, then one of the partitions is close to being a\n    subpartition of the other).\n\n    @param comm1: the first community structure as a membership list or\n      as a L{Clustering} object.\n    @param comm2: the second community structure as a membership list or\n      as a L{Clustering} object.\n    @param remove_none: whether to remove C{None} entries from the membership\n      lists. This is handy if your L{Clustering} object was constructed using\n      L{VertexClustering.FromAttribute} using an attribute which was not defined\n      for all the vertices. If C{remove_none} is C{False}, a C{None} entry in\n      either C{comm1} or C{comm2} will result in an exception. If C{remove_none}\n      is C{True}, C{None} values are filtered away and only the remaining lists\n      are compared.\n\n    @return: the projection distance of C{comm1} from C{comm2} and vice versa\n      in a tuple. The split-join distance is the sum of the two.\n    @newfield ref: Reference\n    @ref: van Dongen D: Performance criteria for graph clustering and Markov\n          cluster experiments. Technical Report INS-R0012, National Research\n          Institute for Mathematics and Computer Science in the Netherlands,\n          Amsterdam, May 2000.\n\n    @see: L{compare_communities()} with C{method = "split-join"} if you are\n      not interested in the individual projection distances but only the\n      sum of them.\n    '
    import igraph._igraph
    (vec1, vec2) = _prepare_community_comparison(comm1, comm2, remove_none)
    return igraph._igraph._split_join_distance(vec1, vec2)