/// <summary>Create a TimedRatingsProxy object</summary> /// <param name="ratings">a ratings data structure</param> /// <param name="indices">an index list pointing to entries in the ratings</param> public TimedRatingsProxy(ITimedRatings ratings, IList<int> indices) { Users = new ListProxy<int>(ratings.Users, indices); Items = new ListProxy<int>(ratings.Items, indices); Values = new ListProxy<float>(ratings, indices); Times = new ListProxy<DateTime>(ratings.Times, indices); MaxUserID = ratings.MaxUserID; MaxItemID = ratings.MaxItemID; Scale = ratings.Scale; EarliestTime = Count > 0 ? Times.Min() : DateTime.MaxValue; LatestTime = Count > 0 ? Times.Max() : DateTime.MinValue; }
/// <summary>Create a TimedRatingsProxy object</summary> /// <param name="ratings">a ratings data structure</param> /// <param name="indices">an index list pointing to entries in the ratings</param> public TimedRatingsProxy(ITimedRatings ratings, IList <int> indices) { Users = new ListProxy <int>(ratings.Users, indices); Items = new ListProxy <int>(ratings.Items, indices); Values = new ListProxy <float>(ratings, indices); Times = new ListProxy <DateTime>(ratings.Times, indices); MaxUserID = ratings.MaxUserID; MaxItemID = ratings.MaxItemID; Scale = ratings.Scale; EarliestTime = Count > 0 ? Times.Min() : DateTime.MaxValue; LatestTime = Count > 0 ? Times.Max() : DateTime.MinValue; }