<commit_before>package util.polymake;

import geometry.Point;

import java.util.Collection;


/**
 * Transforms points into a script as string for computing schlegel vertices and edges
 * @author Nadja, Simon
 */
public class SchlegelTransformer
  implements PolymakeTransformer
{
  
  private final Collection<? extends Point> points;
  private final int facet;
  private String result;
  
  public SchlegelTransformer(Collection<? extends Point> points)
  {
    this.points = points;
    this.facet = -1;
  }
  
  public SchlegelTransformer(Collection<? extends Point> points, int facet)
  {
    this.points = points;
    this.facet = facet;
  }

  @Override
  public String toScript() {
    // TODO Auto-generated method stub
    String script = "";
    script += "use application \"polytope\";\n";

    script += "my $mat=new Matrix<Rational>(";
    script += pointsToString();
    script += ");\n";
    script += "my $p = new Polytope(POINTS=>$mat);\n";

    script += "my $schlegelverts = $p->SCHLEGEL_DIAGRAM->VERTICES;\n";<commit_msg>TODO Stringbuilder statt +<commit_after>package util.polymake;

import geometry.Point;

import java.util.Collection;


/**
 * Transforms points into a script as string for computing schlegel vertices and edges
 * @author Nadja, Simon
 */
public class SchlegelTransformer
  implements PolymakeTransformer
{
  
  private final Collection<? extends Point> points;
  private final int facet;
  private String result;
  
  public SchlegelTransformer(Collection<? extends Point> points)
  {
    this.points = points;
    this.facet = -1;
  }
  
  public SchlegelTransformer(Collection<? extends Point> points, int facet)
  {
    this.points = points;
    this.facet = facet;
  }

  @Override
  public String toScript() {
    // TODO mit Stringbuilder bauen
    String script = "";
    script += "use application \"polytope\";\n";

    script += "my $mat=new Matrix<Rational>(";
    script += pointsToString();
    script += ");\n";
    script += "my $p = new Polytope(POINTS=>$mat);\n";

    script += "my $schlegelverts = $p->SCHLEGEL_DIAGRAM->VERTICES;\n";
{'fraction_non_alphanumeric': 0.12129894937917861, 'fraction_numerical': 0.0009551098376313276, 'mean_word_length': 3.5642701525054465, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7139138', 'n_tokens_mistral': 661, 'n_tokens_neox': 647, 'n_words': 184}