source: java2python/geniuswebtranslator/geniuswebsrc/geniusweb/profile/utilityspace/ValueSetUtilities.java@ 566

Last change on this file since 566 was 519, checked in by wouter, 18 months ago

#169 added geniusweb sources hard copy in the project as I need to hack it a bit.

File size: 1.2 KB
Line 
1package geniusweb.profile.utilityspace;
2
3import java.math.BigDecimal;
4
5import com.fasterxml.jackson.annotation.JsonSubTypes;
6import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
7import com.fasterxml.jackson.annotation.JsonTypeInfo;
8
9import geniusweb.issuevalue.Value;
10import geniusweb.issuevalue.ValueSet;
11
12/**
13 * Provides a mechanism to map {@link Value}s into a utility (value in range
14 * [0,1]).
15 */
16@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
17@JsonSubTypes({ @Type(value = DiscreteValueSetUtilities.class),
18 @Type(value = NumberValueSetUtilities.class) })
19public interface ValueSetUtilities {
20 /**
21 *
22 * @param value the {@link Value} to get the utility for
23 * @return the utility of the given value. MUST be in [0,1]. Should return 0
24 * if the value is unknown.
25 */
26 BigDecimal getUtility(Value value);
27
28 /**
29 *
30 * @param valueset the valueset that is supposed match with this
31 * @return null if the ValueSetUtilities fits the given set of values , that
32 * means it can give utilities for all possible values in valueset.
33 * Or a string containing an explanation why not.
34 */
35 String isFitting(ValueSet valueset);
36
37}
Note: See TracBrowser for help on using the repository browser.