2022-06-27 19:58:38 +00:00

22 lines
3.8 KiB
Go

//
// Copyright 2020 FoxyUtils ehf. All rights reserved.
//
// This is a commercial product and requires a license to operate.
// A trial license can be obtained at https://unidoc.io
//
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
//
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package basic ;import _a "github.com/unidoc/unipdf/v3/internal/jbig2/errors";type NumSlice []float32 ;func NewNumSlice (i int )*NumSlice {_fb :=NumSlice (make ([]float32 ,i ));return &_fb };type IntsMap map[uint64 ][]int ;func (_ab *Stack )peek ()(interface{},bool ){_eg :=_ab .top ();
if _eg ==-1{return nil ,false ;};return _ab .Data [_eg ],true ;};func (_dcc *Stack )Peek ()(_ba interface{},_cf bool ){return _dcc .peek ()};func (_bg IntSlice )Get (index int )(int ,error ){if index > len (_bg )-1{return 0,_a .Errorf ("\u0049\u006e\u0074S\u006c\u0069\u0063\u0065\u002e\u0047\u0065\u0074","\u0069\u006e\u0064\u0065x:\u0020\u0025\u0064\u0020\u006f\u0075\u0074\u0020\u006f\u0066\u0020\u0072\u0061\u006eg\u0065",index );
};return _bg [index ],nil ;};func (_ea *IntSlice )Copy ()*IntSlice {_bf :=IntSlice (make ([]int ,len (*_ea )));copy (_bf ,*_ea );return &_bf ;};func (_dcb *Stack )Pop ()(_bd interface{},_gb bool ){_bd ,_gb =_dcb .peek ();if !_gb {return nil ,_gb ;};_dcb .Data =_dcb .Data [:_dcb .top ()];
return _bd ,true ;};func (_ef *NumSlice )AddInt (v int ){*_ef =append (*_ef ,float32 (v ))};func NewIntSlice (i int )*IntSlice {_f :=IntSlice (make ([]int ,i ));return &_f };func (_db NumSlice )Get (i int )(float32 ,error ){if i < 0||i > len (_db )-1{return 0,_a .Errorf ("\u004e\u0075\u006dS\u006c\u0069\u0063\u0065\u002e\u0047\u0065\u0074","\u0069n\u0064\u0065\u0078\u003a\u0020\u0027\u0025\u0064\u0027\u0020\u006fu\u0074\u0020\u006f\u0066\u0020\u0072\u0061\u006e\u0067\u0065",i );
};return _db [i ],nil ;};type Stack struct{Data []interface{};Aux *Stack ;};func (_ac *Stack )top ()int {return len (_ac .Data )-1};func (_gd IntsMap )Get (key uint64 )(int ,bool ){_d ,_e :=_gd [key ];if !_e {return 0,false ;};if len (_d )==0{return 0,false ;
};return _d [0],true ;};func Sign (v float32 )float32 {if v >=0.0{return 1.0;};return -1.0;};func (_cd IntSlice )Size ()int {return len (_cd )};func Ceil (numerator ,denominator int )int {if numerator %denominator ==0{return numerator /denominator ;};return (numerator /denominator )+1;
};func (_eca NumSlice )GetIntSlice ()[]int {_cb :=make ([]int ,len (_eca ));for _ge ,_cbb :=range _eca {_cb [_ge ]=int (_cbb );};return _cb ;};func (_ec NumSlice )GetInt (i int )(int ,error ){const _dc ="\u0047\u0065\u0074\u0049\u006e\u0074";if i < 0||i > len (_ec )-1{return 0,_a .Errorf (_dc ,"\u0069n\u0064\u0065\u0078\u003a\u0020\u0027\u0025\u0064\u0027\u0020\u006fu\u0074\u0020\u006f\u0066\u0020\u0072\u0061\u006e\u0067\u0065",i );
};_gf :=_ec [i ];return int (_gf +Sign (_gf )*0.5),nil ;};func Min (x ,y int )int {if x < y {return x ;};return y ;};func (_b IntsMap )Delete (key uint64 ){delete (_b ,key )};func Max (x ,y int )int {if x > y {return x ;};return y ;};func (_deb *Stack )Len ()int {return len (_deb .Data )};
func (_de *NumSlice )Add (v float32 ){*_de =append (*_de ,v )};func (_ga *IntSlice )Add (v int )error {if _ga ==nil {return _a .Error ("\u0049\u006e\u0074S\u006c\u0069\u0063\u0065\u002e\u0041\u0064\u0064","\u0073\u006c\u0069\u0063\u0065\u0020\u006e\u006f\u0074\u0020\u0064\u0065f\u0069\u006e\u0065\u0064");
};*_ga =append (*_ga ,v );return nil ;};func (_c IntsMap )Add (key uint64 ,value int ){_c [key ]=append (_c [key ],value )};func (_dd IntsMap )GetSlice (key uint64 )([]int ,bool ){_ddb ,_ee :=_dd [key ];if !_ee {return nil ,false ;};return _ddb ,true ;
};func Abs (v int )int {if v > 0{return v ;};return -v ;};func (_geb *Stack )Push (v interface{}){_geb .Data =append (_geb .Data ,v )};type IntSlice []int ;