Simple method of pair for caching a kernel function.
A unique Key is assigned to each sample, and similarities between two samples are cached in Hashmaps using the keys. Warning: Safety granted by assertion. Disable assertion for a faster but riskier execution.
@author picard
@param < S> The datatype of key (usually String or Integer)
@param < T> The data type of input space
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.