func (edges EdgeList) Less(i, j int) bool {
	return edges[i].weight < edges[j].weight
}
Returns true if the weight of the edge i is less than the weight
of the edge j
package graph
import (
	"github.com/miguelfrde/image-segmentation/utils"
	"image"
	"image/color"
	"math"
)
type Pixel struct {
	X, Y  int
	Color color.Color
}
type WeightFn func(Pixel, Pixel) float64
type Edge struct {
	u, v   int
	weight float64
}
func (e *Edge) U() int {
	return e.u
}
func (e *Edge) V() int {
	return e.v
}
func (e *Edge) Weight() float64 {
	return e.weight
}
type EdgeList []Edge
func (edges EdgeList) Len() int {
	return len(edges)
}