/// <summary> /// /// </summary> /// <param name="coverage"></param> /// <param name="s"></param> /// <param name="p"></param> /// <param name="o"></param> /// <param name="c"></param> /// <returns></returns> public static Tuple <IndexCoverage, TripleMask> SelectIndex(this IndexCoverage coverage, INode s, INode p, INode o, INode c) { var requested = TripleMask.None; if (s != null) { requested |= TripleMask.Subject; } if (p != null) { requested |= TripleMask.Predicate; } if (o != null) { requested |= TripleMask.Object; } if (c != null) { requested |= TripleMask.Context; } return(coverage.SelectIndex(requested)); }
/// <summary> /// /// </summary> /// <param name="coverage"></param> /// <param name="triple"></param> /// <returns></returns> public static Tuple <IndexCoverage, TripleMask> SelectIndex(this IndexCoverage coverage, Edge triple) => coverage.SelectIndex(triple.Subject, triple.Predicate, triple.Object, triple.Context);