public object Execute_partial(object obj, ArrayList cases) { if (_env == null) { throw new ContextException("environment variable is not set"); } ICBRContext ctx = CBRContextManager.GetCBRContext(_env); if (ctx == null) { //throw NoContextException throw new ContextException("not set the context"); } ICaseBase caseBase = ctx.GetCaseBase(); if (caseBase == null) { //throw exception throw new ContextException("not set casebase"); } if (cases == null || cases.Count <= 0) { if (Version.DEBUG) { System.Console.WriteLine("not found cases matched"); } return(null); } //compute the similarity and sort by similarity ascending return(ComputeSimilarity(cases, (Case)obj)); }
public void SetCaseBase(ICaseBase caseBase) { _caseBase = caseBase; }