Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
OrderOfProcessing.cs
1using System.Collections.Generic;
2
4{
8 public class OrderOfProcessing : IComparer<Keyword>
9 {
14 {
15 }
16
20 public int Compare(Keyword x, Keyword y)
21 {
22 int i = y.OrderCategory - x.OrderCategory;
23 if (i != 0)
24 return i;
25
26 i = y.OrderComplexity - x.OrderComplexity;
27 if (i != 0)
28 return i;
29
30 return string.Compare(x.ToString(), y.ToString());
31 }
32 }
33}
Abstract base class for keywords.
Definition: Keyword.cs:11
virtual int OrderCategory
Order category of keyword
Definition: Keyword.cs:37
virtual int OrderComplexity
Order complexity (within category) of keyword
Definition: Keyword.cs:42
int Compare(Keyword x, Keyword y)
IComparer<Keyword>.Compare
OrderOfProcessing()
Orders strings in descending length order