Tabnine Logo
TensorContraction
Code IndexAdd Tabnine to your IDE (free)

How to use
TensorContraction
in
cc.redberry.core.tensor

Best Java code snippets using cc.redberry.core.tensor.TensorContraction (Showing top 9 results out of 315)

origin: cc.redberry/core

  @Override
  public int compareTo(ScaffoldWrapper o) {
    int r = tc.compareTo(o.tc);
    if (r != 0)
      return r;
    if ((r = Integer.compare(hashWithIndices, o.hashWithIndices)) != 0)
      return r;
    return Integer.compare(component, o.component);
  }
}
origin: cc.redberry/core

@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  if (indexContractions.length == 0)
    return builder.append(tensorId).append("x").toString();
  builder.append(tensorId).append("x{");
  for (long l : indexContractions) {
    builder.append("^").append(getFromIndexId(l)).append("->").append(getToTensorId(l)).append("^").append(getToIndexId(l));
    builder.append(":");
  }
  builder.deleteCharAt(builder.length() - 1);
  builder.append("}");
  return builder.toString();
}
origin: cc.redberry/core

@Override
public int hashCode() {
  int hash = 5;
  hash = 67 * hash + this.freeContraction.hashCode();
  hash = 67 * hash + Arrays.hashCode(this.contractions);
  return hash;
}
origin: cc.redberry/physics

  return tensor;
TensorContraction contraction = new TensorContraction(si, new long[]{((long) si) << 16});
short[] sIndices = content.getStretchIds(); //For preformance.
int index = Arrays.binarySearch(sIndices, si);
    continue;
  int indexName;
  if (cs.get(index).equals(contraction)
      && ((indexName = st.getIndices().get(0)) & 0x80000000) == 0)
    list.add(indexName);
origin: cc.redberry/core

final TensorContraction freeContraction = new TensorContraction((short) -1, new long[freeIndices.size()]);
  contractions[tensorIndex] = new TensorContraction(stretchIndices[tensorIndex], new long[tInds.size()]);
  contraction.sortContractions();
freeContraction.sortContractions();
origin: cc.redberry/core

@Override
public boolean equals(final Object obj) {
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  if (hashCode() != obj.hashCode())
    return false;
  final StructureOfContractionsHashed other = (StructureOfContractionsHashed) obj;
  if (!freeContraction.equals(other.freeContraction))
    return false;
  return Arrays.equals(contractions, other.contractions);
}
origin: cc.redberry/core

public boolean containsFreeIndex() {
  for (long contraction : indexContractions)
    if (getToTensorId(contraction) == -1)
      return true;
  return false;
}
origin: cc.redberry/core

if (i == fromContent.size() || !fromContent.getStructureOfContractionsHashed().get(i).equals(fromContent.getStructureOfContractionsHashed().get(i - 1))) {
  if (i - 1 != begin)
    stretches.add(new Pair(fromContent.getRange(begin, i), toContent.getRange(begin, i)));
origin: cc.redberry/core

@Override
public boolean equals(final Object obj) {
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  if (hashCode() != obj.hashCode())
    return false;
  final TensorContraction other = (TensorContraction) obj;
  if (tensorId != other.tensorId)
    return false;
  return Arrays.equals(indexContractions, other.indexContractions);
}
cc.redberry.core.tensorTensorContraction

Most used methods

  • <init>
  • equals
  • compareTo
  • getFromIndexId
  • getToIndexId
  • getToTensorId
  • hashCode
  • sortContractions

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now