package MultiColumnData sub ClearAll my $this = shift; sub SkipBlankData return shift->{SkipBlankData}; sub SetSkipBlankData my ($this, $f) = @_; return $this->{SkipBlankData} = $f; sub SetpX sub SetpX { my($this,$p)= return shift->{pX} = $p; sub SetpY sub SetpY { my($this,$p)= return shift->{pY} = $p; sub pX return shift->{pX}; sub pY return shift->{pY}; sub XMin return shift->{XMin}; sub XMax return shift->{XMax}; sub YMin return shift->{YMin}; sub YMax return shift->{YMax}; sub GetXMinMax sub GetXMinMax { my $this = return ($this->{XMin}, $this->{XMax}); sub GetYMinMax sub GetYMinMax { my $this = return ($this->{YMin}, $this->{YMax}); sub GetMinMax sub GetMinMax { my $this = return ($this->{XMin}, $this->{XMax}, $this->{YMin}, $this->{YMax}); sub IncidentAngle return shift->{IncidentAngle}; sub SetIncidentAngle sub SetIncidentAngle { my ($this,$a)= return $this->{IncidentAngle} = $a; sub Title return shift->{Title}; sub SetTitle sub SetTitle { my ($this,$t)= return $this->{Title} = $t; sub FileName return shift->{'FilePath'}; sub SetFileName sub SetFileName { my ($this,$f)= return $this->{FilePath} = $f; sub FilePath return shift->{'FilePath'}; sub SetFilePath sub SetFilePath { my ($this,$f)= return $this->{FilePath} = $f; sub FileType my ($this) = @_; return '' if(!defined $this->{FileType}); return $this->{FileType}; sub SetFileType sub SetFileType { my ($this,$t)= return shift->{FileType} = $t; sub LabelArray return shift->{LabelArray}; sub SetLabelArray sub SetLabelArray { my ($this,$la)= return $this->{LabelArray} = $la; sub DataArray my ($this, $idx) = @_; return $this->{DataArray} if(!defined $idx); return $this->{DataArray}->[$idx]; sub SetDataArray sub SetDataArray { my ($this,$da)= return $this->{DataArray} = $da; sub AddData my ($this, $label, $pData) = @_; sub AddDataByConversion my ($this, $label, $pData, $convfunc) = @_; sub nDataArray return scalar @$la if($la); return 0; sub LabelIndexHash return shift->{LabelIndexHash}; sub SetLabelIndexHash sub SetLabelIndexHash { my ($this,$lh)= return $this->{LabelIndexHash} = $lh; sub CreateBlankDataArray my ($this, $pLabelArray) = @_; return $this->SetDataArray(\@a); sub nData my ($this, $idx) = @_; return scalar @$pX; return 0 if(!$da); return 0 if(!$d0); return scalar @$d0; sub X my ($this, $idx) = @_; return $this->{pX}->[$idx]; sub Y my ($this, $idx) = @_; return $this->{pY}->[$idx]; sub BuildLabelIndexHash my ($this) = @_; return $this->SetLabelIndexHash(\%hash); sub AddItem my ($this, %hash) = @_; sub GetArraysFromFile my ($path) = @_; return (undef) if(!$CSV->Read($path)); return (0, $pLabelArray, @$pDataArray) if(!$pDataArray); return ($nData, $pLabelArray, @$pDataArray); sub RemakeDataArrayFromFile my ($path, $pX, $IsXStepConstant) = @_; return undef if(!defined $nData); return @ConvDataArray; sub BEGIN sub new my ($module) = @_; return $this; sub DESTROY my $this = shift; sub Initialize my ($this) = @_; sub Open my ($this, $filename, $mode) = @_; return $this->{JFile} = new JFile($filename, $mode); sub Close my ($this) = @_; sub CalMinMaxStep my ($this, @labels) = @_; return ($this->{XMin}, $this->{XMax}, $this->{YMin}, $this->{YMax}); return Utils::CalMinMaxStep($pData) if($pData); return undef; sub CalMinMax my ($this, @labels) = @_; return ($this->{XMin}, $this->{XMax}, $this->{YMin}, $this->{YMax}); return Utils::CalMinMax($pData) if($pData); return undef; sub HashByXDataKey my ($this, $key, $UseRegEx, $CaseSensitive) = @_; return () if(!defined $iHit); return $this->HashByIndex($iHit); sub HashByIndex my ($this, $idx) = @_; return \%Hash; sub ValByIndex my ($this, $idx, $i) = @_; return $pData->[$i]; sub XVal my ($this, $pX, $pY, $y, $EPS, $nMaxIter, $xmin, $xmax, $xinit, $dx, $Debug) = @_; ($this, $y, $EPS, $nMaxIter, $xmin, $xmax, $xinit, $dx, $Debug) = return $this->XValByBinaryMethod($pX, $pY, $y, $EPS, $nMaxIter, $xmin, $xmax, $xinit, $dx, $Debug); return $this->XValByNewtonMethod($pX, $pY, $y, $EPS, $nMaxIter, $xmin, $xmax, $xinit, $dx, $Debug); sub XValByNewtonMethod my ($this, $pX, $pY, $y, $EPS, $nMaxIter, $xmin, $xmax, $xinit, $dx, $Debug) = @_; ($this, $y, $EPS, $nMaxIter, $xmin, $xmax, $xinit, $dx, $Debug) = return undef; return undef; return $x; sub XValByBinaryMethod my ($this, $pX, $pY, $y, $EPS, $nMaxIter, $xmin, $xmax, $dx, $Debug) = @_; ($this, $y, $EPS, $nMaxIter, $xmin, $xmax, $dx, $Debug) = return undef; return undef; return $x; sub YVal my ($this, $pX, $pY, $x) = @_; ($this, $x) = return Algorism::InterpolateByCubicSpline($pX, $pY, $x); sub ConevrtToNumerical my ($this, @DataArray) = @_; sub SetXYData my ($this, $pX, $pY) = @_; return $this->SetXYDataByArrays($pX, $pY) if($pX =~ /^ARRAY\(/); return $this->SetXYDataByLabels($pX, $pY); sub SetXYDataByArrays my ($this, $pX, $pY) = @_; sub SetXYDataByLabels my ($this, $XLabel, $YLabel) = @_; return ($pX, $pY); sub GetXData my ($this, @labels) = @_; return $this->{pX} = $this->GetData(@labels); sub GetYData my ($this, @labels) = @_; return $this->{pY} = $this->GetData(@labels); sub ReverseData my ($this) = @_; sub FindLabelIndex my ($this, $pLabels, $pLabelArray) = @_; return $i; return undef; sub GetData my ($this, @labels) = @_; return $pDataArray->[$labels[0]] if($labels[0] =~ /^\d+$/i); return $pDataArray->[$i]; return undef; sub SortXYByX my ($this, $f) = @_; return undef if(!defined $pX or !defined $pY); return $Data; sub Read my ($this, $filename, $IsNumerical, $YLabel) = @_; return undef if(!defined $pLabelArray); return ($nData, $pLabelArray, @DataArray); sub ReadAll my ($this, $filename, $YLabel) = @_; return $this->ReadSPE($filename); return $this->ReadSPEPal($filename); return $this->ReadASP($filename, $YLabel); return $this->ReadR($filename); return undef; return ($nData, $pLabelArray, @DataArray); return undef; sub ReadSPE my ($this, $filename) = @_; return undef; return (-1); return ($nData, $pLabelArray, @$pDataArray); sub ReadSPEPal my ($this, $filename) = @_; return undef if(!$in); return (-1); return ($nData, $pLabelArray, @$pDataArray); sub ReadASP my ($this, $filename, $YLabel) = @_; return $this->ReadU4000ASP($filename, $YLabel) if($nData == -1); return ($nData, $pLabelArray, @DataArray); sub ReadU4000ASPXY my ($this, $filename, $YLabel) = @_; return undef; return ($nData, \@LabelList, @DataArray); sub ReadU4000ASP my ($this, $filename, $YLabel) = @_; return undef; return $this->ReadU4000ASPXY($filename, $YLabel); return ($nData, \@LabelList, @DataArray); sub ReadR my ($this, $filename) = @_; return undef; return ($c, \@LabelList, @DataArray);