<commit_before>//  Copyright (c) 2015 <NAME>. All rights reserved.

public struct Edge: Hashable, Printable {
	public typealias Source = (identifier: Identifier, outputIndex: Int)
	public typealias Destination = (identifier: Identifier, inputIndex: Int)

	public init(_ source: Source, _ destination: Destination) {
		self.source = source
		self.destination = destination
	}

	public init (_ source: Identifier, _ destination: Destination) {
		self.init(source.output(0), destination)
	}

	public let source: Source
	public let destination: Destination


	// MARK: Hashable

	public var hashValue: Int {
		return (source.identifier.hashValue + source.outputIndex) ^ (destination.identifier.hashValue + destination.inputIndex)
	}

	
	// MARK: Printable
	
	public var description: String {
		return "\(source.identifier): \(source.outputIndex) -> \(destination.identifier): \(destination.inputIndex)"
	}
}

public func == (left: Edge.Source, right: Edge.Source) -> Bool {
	return left.identifier == right.identifier && left.outputIndex == right.outputIndex
}

public func == (left: Edge.Destination, right: Edge.Destination) -> Bool {
	return left.identifier == right.identifier && left.inputIndex == right.inputIndex
}

public func < (left: Edge.Source, right: Edge.Source) -> Bool {
	return left.identifier == right.identifier ?
		left.outputIndex < right.outputIndex
	:	left.identifier < right.identifier
}

public func < (left: Edge.Destination, right: Edge.Destination) -> Bool {
	return left.identifier == right.identifier ?
		left.inputIndex < right.inputIndex
	:	left.identifier < right.identifier
}

public func == (left: Edge, right: Edge) -> Bool {
	return left.source == right.source && left.destination == right.destination
}
<commit_msg>Fix ambiguities in < and == operators over Edge.Source/Edge.Destination.<commit_after>//  Copyright (c) 2015 <NAME>. All rights reserved.

public struct Edge: Hashable, Printable {
	public typealias Source = (identifier: Identifier, outputIndex: Int)
	public typealias Destination = (identifier: Identifier, inputIndex: Int)

	public init(_ source: Source, _ destination: Destination) {
		self.source = source
		self.destination = destination
	}

	public init (_ source: Identifier, _ destination: Destination) {
		self.init(source.output(0), destination)
	}

	public let source: Source
	public let destination: Destination


	// MARK: Hashable

	public var hashValue: Int {
		return (source.identifier.hashValue + source.outputIndex) ^ (destination.identifier.hashValue + destination.inputIndex)
	}

	
	// MARK: Printable
	
	public var description: String {
		return "\(source.identifier): \(source.outputIndex) -> \(destination.identifier): \(destination.inputIndex)"
	}
}

public func == (left: (Identifier, Int), right: (Identifier, Int)) -> Bool {
	return left.0 == right.0 && left.1 == right.1
}

public func < (left: (Identifier, Int), right: (Identifier, Int)) -> Bool {
	return left.0 == right.0 ?
		left.1 < right.1
	:	left.0 < right.0
}

public func == (left: Edge, right: Edge) -> Bool {
	return left.source == right.source && left.destination == right.destination
}

{'fraction_non_alphanumeric': 0.1278772378516624, 'fraction_numerical': 0.00639386189258312, 'mean_word_length': 4.357876712328767, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7356822', 'n_tokens_mistral': 943, 'n_tokens_neox': 893, 'n_words': 262}