gov.sandia.cognition.learning.function.distance.IdentityDistanceMetric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cognitive-foundry Show documentation
Show all versions of cognitive-foundry Show documentation
A single jar with all the Cognitive Foundry components.
/*
* File: IdentityDistanceMetric.java
* Authors: Justin Basilico
* Project: Cognitive Foundry
*
* Copyright 2011 Cognitive Foundry. All rights reserved.
*/
package gov.sandia.cognition.learning.function.distance;
import gov.sandia.cognition.math.Metric;
import gov.sandia.cognition.util.AbstractCloneableSerializable;
import gov.sandia.cognition.util.ObjectUtil;
/**
* A distance metric that is 0 if two objects are equal and 1 if they are not.
* Can be used with any object with a valid equals method.
*
* @author Justin Basilico
* @since 3.3.3
*/
public class IdentityDistanceMetric
extends AbstractCloneableSerializable
implements Metric