All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.virtdata.libbasics.shared.from_long.to_object.CoinFuncAutoDocsInfo Maven / Gradle / Ivy

There is a newer version: 2.12.15
Show newest version
// This file is auto-generated.
package io.virtdata.libbasics.shared.from_long.to_object;

import io.virtdata.annotations.Category;
import io.virtdata.annotations.Service;
import io.virtdata.processors.DocCtorData;
import io.virtdata.processors.DocForFuncCtor;
import io.virtdata.processors.DocFuncData;
import java.lang.String;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;

@Service(DocFuncData.class)
public class CoinFuncAutoDocsInfo implements DocFuncData {
  public String getClassName() {
    return "CoinFunc";
  }

  public String getPackageName() {
    return "io.virtdata.libbasics.shared.from_long.to_object";
  }

  public String getClassJavadoc() {
    return "This is a higher-order function which takes an input value,\n"
            + "and flips a coin. The first parameter is used as the threshold\n"
            + "for choosing a function. If the sample values derived from the\n"
            + "input is lower than the threshold value, then the first following\n"
            + "function is used, and otherwise the second is used.\n"
            + "\n"
            + "For example, if the threshold is 0.23, and the input value is\n"
            + "hashed and sampled in the unit interval to 0.43, then the second\n"
            + "of the two provided functions will be used.\n"
            + "\n"
            + "The input value does not need to be hashed beforehand, since the\n"
            + "user may need to use the full input value before hashing as the\n"
            + "input to one or both of the functions.\n"
            + "\n"
            + "This function will accept either a LongFunction or a {@link Function}\n"
            + "or a LongUnaryOperator in either position. If necessary, use\n"
            + "{@link java.util.function.ToLongFunction} to adapt other function forms to be\n"
            + "compatible with these signatures.\n";
  }

  public String getInType() {
    return "java.lang.Long";
  }

  public String getOutType() {
    return "java.lang.Object";
  }

  public Category[] getCategories() {
    return new Category[] { Category.distributions };
  }

  public List getCtors() {
    return new ArrayList() {{
          add(new DocForFuncCtor("CoinFunc", "", 
            new LinkedHashMap() {{
              put("threshold","double");
              put("first","java.lang.Object");
              put("second","java.lang.Object");
            }},
            new ArrayList>() {{
              add(new ArrayList() {{
                add("CoinFunc(0.15,NumberNameToString(),Combinations('A:1:B:23'))");
                add("use the first function 15% of the time");
              }});
            }}
          ));
        }};
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy