Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of DISCO and DIMSUM algorithms. #833

Merged
merged 5 commits into from Mar 26, 2014

Conversation

@reconditesea
Copy link
Contributor

commented Mar 25, 2014

reconditesea added some commits Mar 25, 2014

}

// Returns all edges with weights and non-zero norms
def withNorm[N,E](g: TypedPipe[Edge[N,Weight]])(implicit ord: Ordering[N]):

This comment has been minimized.

Copy link
@johnynek

johnynek Mar 25, 2014

Collaborator

this should probably be called withInNorm to distinguish the total in-degree weight of a node from the total out-degree weight of the node.

/** Represents an Edge in a graph with some edge data
*/
case class Edge[+N,+E](from: N, to: N, data: E) {
def mapData[F](fn: (E => F)): Edge[N,F] = Edge(from, to, fn(data))

This comment has been minimized.

Copy link
@johnynek

johnynek Mar 25, 2014

Collaborator

can we add: def reverse: Edge[N, E] which swaps from and to. This will make it easier to reverse graphs to reuse the similarity code.

abstract sealed trait Degree { val degree: Int }
case class InDegree(override val degree: Int) extends Degree
case class OutDegree(override val degree: Int) extends Degree
case class Weight(val weight: Double)

This comment has been minimized.

Copy link
@johnynek

johnynek Mar 25, 2014

Collaborator

I don't think weight or norm need val. It is public due to case class. InDegree needs it to override degree.

}
.values

// Returns all edges with non-zero in-degree

This comment has been minimized.

Copy link
@ianoc

ianoc Mar 25, 2014

Collaborator

Vertices rather than edges right?

This comment has been minimized.

Copy link
@reconditesea

reconditesea Mar 25, 2014

Author Contributor

Correct, will change this.

johnynek added a commit that referenced this pull request Mar 26, 2014

Merge pull request #833 from twitter/klin_typed_sim
Implementation of DISCO and DIMSUM algorithms.

@johnynek johnynek merged commit 86ee158 into develop Mar 26, 2014

1 check passed

default The Travis CI build passed
Details

@johnynek johnynek deleted the klin_typed_sim branch Mar 26, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.