Esempio n. 1
0
 public double AuthorRank(int startYear, int endYear) => Papers
 .Where(
     paper => paper.Years.Any(
         year =>
         year >= startYear &&
         year <= endYear
         )
     )
 .Select(
     paper => paper.CitedIn.Count()
     )
 .Average();
Esempio n. 2
0
 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();
Esempio n. 3
0
 public virtual List <Paper> FilterPapers(string query)
 {
     return(Papers.Where(ce => (ce.title.ToLower().Contains(query))).ToList());
 }
Esempio n. 4
0
 public virtual Paper GetPaperById(int id)
 {
     return(Papers.Where(p => (p.id.Equals(id))).Single <Paper>());
 }