mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 00:38:46 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
33 lines
684 B
Scala
33 lines
684 B
Scala
package com.twitter.graph_feature_service.worker.util
|
|
|
|
import com.twitter.graph_feature_service.thriftscala.EdgeType
|
|
import com.twitter.graph_feature_service.thriftscala.EdgeType._
|
|
|
|
sealed trait GraphKey {
|
|
|
|
def edgeType: EdgeType
|
|
}
|
|
|
|
sealed trait PartialValueGraph extends GraphKey
|
|
|
|
/**
|
|
* Follow Graphs
|
|
*/
|
|
object FollowingPartialValueGraph extends PartialValueGraph {
|
|
|
|
override def edgeType: EdgeType = Following
|
|
}
|
|
|
|
object FollowedByPartialValueGraph extends PartialValueGraph {
|
|
|
|
override def edgeType: EdgeType = FollowedBy
|
|
}
|
|
|
|
/**
|
|
* Mutual Follow Graphs
|
|
*/
|
|
object MutualFollowPartialValueGraph extends PartialValueGraph {
|
|
|
|
override def edgeType: EdgeType = MutualFollow
|
|
}
|