We were discussing the different kinds of query processing:
First, the time-series analysis queries are primarily focused on detecting trends or anomalies in archived streams.They can specify sort order, anomalies and not contiguous change patterns. Incident detection falls under this category.
Second, the similarity search queries. In this class of queries, a user is interested in determining whether the data is similar to a given pattern. Again using archived data, the pattern matching helps determine events of interest. Surveillance data querying falls under this category.
Third, the classification queries are related to similarity search queries but these run classification algorithms that group and tag the event data. Determining grades of data is one example of this query processing.
Fourth the signal processing queries. These are heavy computations performed on the data directly such as Fast Fourier Transform and filtering. These enable interpretations that are not possible via grouping, sorting, searching and ranking techniques mentioned earlier.
We talked about these queries in the context of the data from internet of things. There are different data sources. Logs for instance fall naturally in a time - series database and the querying for logs has given rise to a rich form of search operators and query options.
We talked about these queries in the context of the data from internet of things. There are different data sources. Logs for instance fall naturally in a time - series database and the querying for logs has given rise to a rich form of search operators and query options.
#codingexercise
We were discussing the method to find pairs that make up the same sum in a sorted list.
void PrintPairsForGivenSum (List <int> sorted, int sum)
{
validate(sorted);
for (int I = 0; i < sorted.length; i++) {
int index = binarySearch(sorted, sum - sorted [i], i);
if ( index != -1 && index != i) {
Console.WriteLine ("{0} {1}", sorted [i], sorted [index]);
}
}
}
Notice that it might be sufficient to iterate the list only upto the element that crosses the value of sum/2 and results in an optimization of the method above. The binary search already performs log(n)
We were discussing the method to find pairs that make up the same sum in a sorted list.
void PrintPairsForGivenSum (List <int> sorted, int sum)
{
validate(sorted);
for (int I = 0; i < sorted.length; i++) {
int index = binarySearch(sorted, sum - sorted [i], i);
if ( index != -1 && index != i) {
Console.WriteLine ("{0} {1}", sorted [i], sorted [index]);
}
}
}
Notice that it might be sufficient to iterate the list only upto the element that crosses the value of sum/2 and results in an optimization of the method above. The binary search already performs log(n)
No comments:
Post a Comment