slib.sml.sm.core.utils
Class SMutils

java.lang.Object
  extended by slib.sml.sm.core.utils.SMutils

public class SMutils
extends Object

Class used to define utility methods.

Author:
Harispe Sébastien

Constructor Summary
SMutils()
           
 
Method Summary
static
<X> Double
getMinStrictPositiveDouble(Map<X,Double> m)
          Return the minimal positive value amon the values of the map (0 excluded)
static void throwArithmeticCriticalException(SMconf m, SMconf p, org.openrdf.model.URI e1, org.openrdf.model.URI e2, Object value)
          Used to generate a SLIB_Ex_Critic for a groupwise comparison considering the given parameters.
static void throwArithmeticCriticalException(SMconf pairwiseConf, org.openrdf.model.URI a, org.openrdf.model.URI b, Object value)
          Used to generate a SLIB_Ex_Critic for a pairwise comparison considering the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMutils

public SMutils()
Method Detail

throwArithmeticCriticalException

public static void throwArithmeticCriticalException(SMconf pairwiseConf,
                                                    org.openrdf.model.URI a,
                                                    org.openrdf.model.URI b,
                                                    Object value)
                                             throws slib.utils.ex.SLIB_Ex_Critic
Used to generate a SLIB_Ex_Critic for a pairwise comparison considering the given parameters.

Parameters:
pairwiseConf - the pairwise measure configuration to consider
a - the first vertex
b - the second vertex
value -
Throws:
slib.utils.ex.SLIB_Ex_Critic

throwArithmeticCriticalException

public static void throwArithmeticCriticalException(SMconf m,
                                                    SMconf p,
                                                    org.openrdf.model.URI e1,
                                                    org.openrdf.model.URI e2,
                                                    Object value)
                                             throws slib.utils.ex.SLIB_Ex_Critic
Used to generate a SLIB_Ex_Critic for a groupwise comparison considering the given parameters.

Parameters:
m - groupwise measure configuration
p - pairwise measure configuration
e1 - the first entity compared
e2 - the second entity compared
value - the value obtained during the comparison
Throws:
slib.utils.ex.SLIB_Ex_Critic

getMinStrictPositiveDouble

public static <X> Double getMinStrictPositiveDouble(Map<X,Double> m)
Return the minimal positive value amon the values of the map (0 excluded)

Type Parameters:
X - the type of key
Parameters:
m - the map
Returns:
the minimal positive value among the key, null if no positive values.


Copyright © 2013. All Rights Reserved.