<commit_before><?php

class Counter{

  public $Tens = array();
  public $Unified = array();
  private $Plate = 0;
  private $ImageCenter;

  function __construct($PlateType) {
    $this->Plate = ($PlateType == null ? $PlateType = 0 : $PlateType);
    for ($i=0; $i<10; $i++) {
      $this->Tens[$i] = new Radiant();
      if ($i < 2)
        $this->Unified[$i] = array('NW' => 0, 'NE' => 0, 'SE' => 0, 'SW' => 0, 'C' => 0);
    }
  }

  function GetRawData() {
    $i1Inner = $this->Unified[0]['NW'] + $this->Unified[0]['NE'] + $this->Unified[0]['SE'] + $this->Unified[0]['SW'];
    $i1Outer = $this->Unified[1]['NW'] + $this->Unified[1]['NE'] + $this->Unified[1]['SE'] + $this->Unified[1]['SW'];
    $i2Inner = $i1Inner + 4;
    $i2Outer = $i1Outer + 4;

    $fX = 1.078095 - 2.586236 * exp(-0.875008 * ($i2Outer / $i2Inner));
    $fX = round($fX, 5);
    $fY = max($i1Outer, $i1Inner) / 12;
    $fY = round($fY, 5);

    $sOut = $fX.';'.$fY.';';
    $sOut .= $this->Tens[0]->NW->GetRawData().';'.$this->Tens[0]->NE->GetRawData().';'.$this->Tens[0]->SE->GetRawData().';'.$this->Tens[0]->SW->GetRawData().';';
    $sOut .= $this->Tens[1]->NW->GetRawData().';'.$this->Tens[1]->NE->GetRawData().';'.$this->Tens[1]->SE->GetRawData().';'.$this->Tens[1]->SW->GetRawData().';';
    $sOut .= $this->Tens[2]->NW->GetRawData().';'.$this->Tens[2]->NE->GetRawData().';'.$this->Tens[2]->SE->GetRawData().';'.$this->Tens[2]->SW->GetRawData().';';<commit_msg>Changed X calculation (thanx to e.zimmermann)<commit_after><?php

class Counter{

  public $Tens = array();
  public $Unified = array();
  private $Plate = 0;
  private $ImageCenter;

  function __construct($PlateType) {
    $this->Plate = ($PlateType == null ? $PlateType = 0 : $PlateType);
    for ($i=0; $i<10; $i++) {
      $this->Tens[$i] = new Radiant();
      if ($i < 2)
        $this->Unified[$i] = array('NW' => 0, 'NE' => 0, 'SE' => 0, 'SW' => 0, 'C' => 0);
    }
  }

  function GetRawData() {
    $i1Inner = $this->Unified[0]['NW'] + $this->Unified[0]['NE'] + $this->Unified[0]['SE'] + $this->Unified[0]['SW'];
    $i1Outer = $this->Unified[1]['NW'] + $this->Unified[1]['NE'] + $this->Unified[1]['SE'] + $this->Unified[1]['SW'];
    $i2Inner = $i1Inner + 4;
    $i2Outer = $i1Outer + 4;

    $iSum = $i2Inner + $i2Outer;
    $iFactor = (($this->Unified[0]['NW'] + $this->Unified[1]['NW']) / $iSum) *
               (($this->Unified[0]['NE'] + $this->Unified[1]['NE']) / $iSum) *
               (($this->Unified[0]['SE'] + $this->Unified[1]['SE']) / $iSum) *
               (($this->Unified[0]['SW'] + $this->Unified[1]['SW']) / $iSum);
    $iFactor *= 256;
    $fX = 1.1384332 - 2.297894 * exp(-0.70234011 * ($i2Outer / $i2Inner * $iFactor));
    $fX = round($fX, 5);
    $fY = max($i1Outer, $i1Inner) / 12;
    $fY = round($fY, 5);

    $sOut = $fX.';'.$fY.';';
    $sOut .= $this->Tens[0]->NW->GetRawData().';'.$this->Tens[0]->NE->GetRawData().';'.$this->Tens[0]->SE->GetRawData().';'.$this->Tens[0]->SW->GetRawData().';';
    $sOut .= $this->Tens[1]->NW->GetRawData().';'.$this->Tens[1]->NE->GetRawData().';'.$this->Tens[1]->SE->GetRawData().';'.$this->Tens[1]->SW->GetRawData().';';
    $sOut .= $this->Tens[2]->NW->GetRawData().';'.$this->Tens[2]->NE->GetRawData().';'.$this->Tens[2]->SE->GetRawData().';'.$this->Tens[2]->SW->GetRawData().';';
{'fraction_non_alphanumeric': 0.31115814938010283, 'fraction_numerical': 0.04596310855760508, 'mean_word_length': 3.5129604365620737, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 115, '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': '3889790', 'n_tokens_mistral': 1479, 'n_tokens_neox': 1412, 'n_words': 193}