the-algorithm/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/worker/util/GraphKey.scala
twitter-team ef4c5eb65e Twitter Recommendation Algorithm
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.
2023-03-31 17:36:31 -05:00

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
}