public class Terms extends Object
Constructor | Description |
---|---|
Terms() |
Modifier and Type | Method | Description |
---|---|---|
static <T> boolean |
contains(T[] array,
T v) |
|
static <T> boolean |
containsAll(T[] a,
T[] b) |
compres a set of terms (assumed to be unique) with another set to find if their
contents match.
|
static boolean |
containsAny(Term[] a,
Collection<Term> b) |
a contains any of b NOT TESTED YET
|
(package private) static boolean |
equals(Term[] a,
Term[] b) |
|
static boolean |
equalSubjectPredicateInRespectToImageAndProduct(Term a,
Term b) |
|
static boolean |
equalSubTermsInRespectToImageAndProduct(Term a,
Term b) |
|
static <T> int |
indexOf(T[] array,
T v) |
|
static List<TermLink> |
prepareComponentLinks(List<TermLink> componentLinks,
short type,
CompoundTerm term) |
Collect TermLink templates into a list, go down one level except in
special cases
|
static List<TermLink> |
prepareComponentLinks(List<TermLink> componentLinks,
CompoundTerm ct) |
|
static Term |
reduceComponentOneLayer(CompoundTerm compound,
Term component,
Memory memory) |
|
static Term |
reduceComponents(CompoundTerm compound,
Term component,
Memory memory) |
Try to remove a component from a compound
|
static Term |
reduceUntilLayer2(CompoundTerm _itself,
Term replacement,
Memory memory) |
|
static Term |
term(Symbols.NativeOperator copula,
Term[] componentList) |
Try to make a compound term from an operator and a list of term
|
static Term |
term(CompoundTerm compound,
Collection<Term> components) |
|
static Term |
term(CompoundTerm compound,
Term[] components) |
Try to make a compound term from a template and a list of term
|
static Term |
unwrapNegation(Term T) |
|
static void |
verifyNonNull(Collection t) |
|
(package private) static void |
verifyNonNull(Term... t) |
|
static Term[] |
verifySortedAndUnique(Term[] arg,
boolean allowSingleton) |
public static boolean equalSubTermsInRespectToImageAndProduct(Term a, Term b)
public static Term reduceUntilLayer2(CompoundTerm _itself, Term replacement, Memory memory)
public static Term term(CompoundTerm compound, Term[] components)
compound
- The templatecomponents
- The termpublic static Term term(CompoundTerm compound, Collection<Term> components)
public static Term term(Symbols.NativeOperator copula, Term[] componentList)
Called from StringParser
copula
- Term operatorcomponentList
- Component listpublic static Term reduceComponents(CompoundTerm compound, Term component, Memory memory)
compound
- The compoundcomponent
- The componentmemory
- Reference to the memorypublic static Term reduceComponentOneLayer(CompoundTerm compound, Term component, Memory memory)
public static boolean equalSubjectPredicateInRespectToImageAndProduct(Term a, Term b)
public static List<TermLink> prepareComponentLinks(List<TermLink> componentLinks, short type, CompoundTerm term)
componentLinks
- The list of TermLink templates built so fartype
- The type of TermLink to be builtterm
- The CompoundTerm for which the links are builtpublic static List<TermLink> prepareComponentLinks(List<TermLink> componentLinks, CompoundTerm ct)
public static <T> int indexOf(T[] array, T v)
public static <T> boolean containsAll(T[] a, T[] b)
public static boolean containsAny(Term[] a, Collection<Term> b)
public static <T> boolean contains(T[] array, T v)
public static void verifyNonNull(Collection t)
static void verifyNonNull(Term... t)
Copyright © 2020 OpenNARS. All rights reserved.