public double AuthorRank(int startYear, int endYear) => Papers .Where( paper => paper.Years.Any( year => year >= startYear && year <= endYear ) ) .Select( paper => paper.CitedIn.Count() ) .Average();
public double AuthorHotRank(int startYear, int endYear) => Papers .Where( paper => paper.Years.Any( year => year >= startYear && year <= endYear ) ) .Select( paper => paper .CitedIn .Count(cite => cite.Years.Min() - paper.Years.Max() <= 1) ) .Average();
public virtual List <Paper> FilterPapers(string query) { return(Papers.Where(ce => (ce.title.ToLower().Contains(query))).ToList()); }
public virtual Paper GetPaperById(int id) { return(Papers.Where(p => (p.id.Equals(id))).Single <Paper>()); }