all: gofmt -s

This commit is contained in:
Dan Kortschak
2019-09-08 13:47:43 +09:30
parent 20883b5a15
commit e51f19f66e
5 changed files with 9 additions and 9 deletions

View File

@@ -248,7 +248,7 @@ func (g *DirectedGraph) SetLine(l graph.Line) {
switch {
case g.from[fid] == nil:
g.from[fid] = map[int64]map[int64]graph.Line{tid: map[int64]graph.Line{lid: l}}
g.from[fid] = map[int64]map[int64]graph.Line{tid: {lid: l}}
case g.from[fid][tid] == nil:
g.from[fid][tid] = map[int64]graph.Line{lid: l}
default:
@@ -256,7 +256,7 @@ func (g *DirectedGraph) SetLine(l graph.Line) {
}
switch {
case g.to[tid] == nil:
g.to[tid] = map[int64]map[int64]graph.Line{fid: map[int64]graph.Line{lid: l}}
g.to[tid] = map[int64]map[int64]graph.Line{fid: {lid: l}}
case g.to[tid][fid] == nil:
g.to[tid][fid] = map[int64]graph.Line{lid: l}
default:

View File

@@ -249,7 +249,7 @@ func (g *UndirectedGraph) SetLine(l graph.Line) {
switch {
case g.lines[fid] == nil:
g.lines[fid] = map[int64]map[int64]graph.Line{tid: map[int64]graph.Line{lid: l}}
g.lines[fid] = map[int64]map[int64]graph.Line{tid: {lid: l}}
case g.lines[fid][tid] == nil:
g.lines[fid][tid] = map[int64]graph.Line{lid: l}
default:
@@ -257,7 +257,7 @@ func (g *UndirectedGraph) SetLine(l graph.Line) {
}
switch {
case g.lines[tid] == nil:
g.lines[tid] = map[int64]map[int64]graph.Line{fid: map[int64]graph.Line{lid: l}}
g.lines[tid] = map[int64]map[int64]graph.Line{fid: {lid: l}}
case g.lines[tid][fid] == nil:
g.lines[tid][fid] = map[int64]graph.Line{lid: l}
default:

View File

@@ -257,7 +257,7 @@ func (g *WeightedDirectedGraph) SetWeightedLine(l graph.WeightedLine) {
switch {
case g.from[fid] == nil:
g.from[fid] = map[int64]map[int64]graph.WeightedLine{tid: map[int64]graph.WeightedLine{lid: l}}
g.from[fid] = map[int64]map[int64]graph.WeightedLine{tid: {lid: l}}
case g.from[fid][tid] == nil:
g.from[fid][tid] = map[int64]graph.WeightedLine{lid: l}
default:
@@ -265,7 +265,7 @@ func (g *WeightedDirectedGraph) SetWeightedLine(l graph.WeightedLine) {
}
switch {
case g.to[tid] == nil:
g.to[tid] = map[int64]map[int64]graph.WeightedLine{fid: map[int64]graph.WeightedLine{lid: l}}
g.to[tid] = map[int64]map[int64]graph.WeightedLine{fid: {lid: l}}
case g.to[tid][fid] == nil:
g.to[tid][fid] = map[int64]graph.WeightedLine{lid: l}
default:

View File

@@ -259,7 +259,7 @@ func (g *WeightedUndirectedGraph) SetWeightedLine(l graph.WeightedLine) {
switch {
case g.lines[fid] == nil:
g.lines[fid] = map[int64]map[int64]graph.WeightedLine{tid: map[int64]graph.WeightedLine{lid: l}}
g.lines[fid] = map[int64]map[int64]graph.WeightedLine{tid: {lid: l}}
case g.lines[fid][tid] == nil:
g.lines[fid][tid] = map[int64]graph.WeightedLine{lid: l}
default:
@@ -267,7 +267,7 @@ func (g *WeightedUndirectedGraph) SetWeightedLine(l graph.WeightedLine) {
}
switch {
case g.lines[tid] == nil:
g.lines[tid] = map[int64]map[int64]graph.WeightedLine{fid: map[int64]graph.WeightedLine{lid: l}}
g.lines[tid] = map[int64]map[int64]graph.WeightedLine{fid: {lid: l}}
case g.lines[tid][fid] == nil:
g.lines[tid][fid] = map[int64]graph.WeightedLine{lid: l}
default:

View File

@@ -19,7 +19,7 @@ type Point []float64
func (p Point) Compare(c Comparable, d Dim) float64 { q := c.(Point); return p[d] - q[d] }
// Dims returns the number of dimensions described by the receiver.
func (p Point) Dims() int { return len(p) }
func (p Point) Dims() int { return len(p) }
// Distance returns the squared Euclidean distance between c and the receiver. The
// concrete type of c must be Point.