Creates a Song (a set of attributes) that behaves like a dictionary:
Parameters: |
|
---|
Deletes all edges to other songs and tries to fill the resulting hole.
Filling the hole that may be created is done by comparing it’s neighbors with each other and adding new distances.
Add a relation to other with a certain distance.
Parameters: |
|
---|---|
Returns: | False if the song was not added because of a worse distance. True in any other case. |
Compute the distance to another song.
This is a method of Song and not a static method for convinience. If you need a static method do this: Song.distance_compute(s1, s2).
Parameters: | other_song – a munin.song.Song |
---|---|
Returns: | A munin.distance.Distance with according weighting. |
Return the distance to the song other_song
Parameters: |
|
---|---|
Returns: | A Distance. |
Iterate over the indirect neighbors of this song.
Returns: | an generator that yields one song at a time. |
---|
Iterate over all distances stored in this song.
Will yield songs with smallest distance first.
Returns: | iterable that yields (song, distance) tuples. |
---|---|
Return type: | generator |