Ejemplo n.º 1
0
//----------------------------------------------
KVCouple::KVCouple(Int_t zf,Int_t zsup,Int_t div){

	zfra = zf;
	zmax = zsup;
		
	zlim = zfra/div;
	Double_t zmoy = zfra/Double_t(div);
	Double_t diff = zmoy-zlim;
	Int_t sup = TMath::Nint(diff*div);
	if (sup>=1){
		zlim+=1;
	}

	if (zfra>=zmax) {	
		//cas 1
		nbre = zmax-zlim+1;
		if (nbre>0){

			tz1 = new Int_t[nbre];
			tz2 = new Int_t[nbre];
			Int_t z1=0;
			for (Int_t ii=0;ii<nbre;ii+=1){
				z1 = zmax-ii;
				tz1[ii]	=	z1;
				tz2[ii]	=	zfra-z1;
			}
			init=kTRUE;		
		}
		else {
			//return;
			ResetVars();
		}
	}
	else {
		nbre = zfra-zlim+1;
		if (nbre>0){

			tz1 = new Int_t[nbre];
			tz2 = new Int_t[nbre];
			Int_t z1=0;
			for (Int_t ii=0;ii<nbre;ii+=1){
				z1 = zfra-ii;
				tz1[ii]	=	z1;
				tz2[ii]	=	zfra-z1;
			}
			init=kTRUE;		
		}
		else {
			//return;
			ResetVars();
		}
	}
}
Ejemplo n.º 2
0
UUDWrap::UUDWrap()
{

ResetVars();

uulibversion = strdup(VERSION "pl" PATCH);

}
Ejemplo n.º 3
0
MythRenderOpenGL2::MythRenderOpenGL2(const QGLFormat& format,
                                     QPaintDevice* device,
                                     RenderType type)
  : MythRenderOpenGL(format, device, type)
{
    ResetVars();
    ResetProcs();
}
Ejemplo n.º 4
0
CHttpClient::CHttpClient()
{
	// If windows startup winsock
#ifdef WIN32
	WSADATA wsaData;
	WSAStartup(MAKEWORD(2, 2), &wsaData);
#endif

	// Invalidate the socket handle
	m_sSocket = INVALID_SOCKET;

	ResetVars();
}
Ejemplo n.º 5
0
void RevKBCCTrainer::Reset() {
    if(data.get() != 0) {
        ResetVars();
    }
    net1->Reset();
    net2->Reset();
    network = net1;
    firstTrained = false;
    ScopedOut = false;
    TestWhileTrainResults.clear();
    outTestDS.reset();
    bufferDS->Clear();
    SaveNetParameters(net1vals);
    SaveNetParameters(net2vals);
    SubNetlist = resSubNetList;
}
Ejemplo n.º 6
0
//----------------------------------------------
KVCouple::KVCouple(Int_t zf,Int_t zsup){

	//printf("zf=%d zmax=%d\n",zf,zsup);
	zfra = zf;
	zmax = zsup;

	Int_t div=2;

	zlim = zfra/div;
	Double_t zmoy = zfra/Double_t(div);
	Double_t diff = zmoy-zlim;
	Int_t sup = TMath::Nint(diff*div);
	if (sup>=1){
		zlim+=1;
	}
	Int_t zref = 0;
	( (zfra>=zmax) ? zref=zmax : zref=zfra );

	nbre = zref-zlim+1;
	if (nbre>0){
		tz1 = new Int_t[nbre];
		tz2 = new Int_t[nbre];
		Int_t z1=0;
		for (Int_t ii=0;ii<nbre;ii+=1){
			z1 = zref-ii;
			tz1[ii]	=	z1;
			tz2[ii]	=	zfra-z1;
			//printf("      %d    %d %d\n",ii,z1,zfra-z1);
		}
		init=kTRUE;		
	}
	else {
		//return;
		ResetVars();
	}
		
}
Ejemplo n.º 7
0
bool VGMMultiSectionSeq::LoadTracks(ReadMode readMode, long stopTime)
{
	this->readMode = readMode;

	curOffset = dwStartOffset;

	// Clear all track pointers to prevent delete, they must be aliases of section tracks
	aTracks.clear();

	// reset variables
	ResetVars();

	// load all tracks
	uint32_t stopOffset = vgmfile->GetEndOffset();
	while (curOffset < stopOffset && time < stopTime) {
		if (!ReadEvent(stopTime)) {
			break;
		}
	}

	if (readMode == READMODE_ADD_TO_UI)
	{
		SetGuessedLength();
		if (unLength == 0) {
			return false;
		}
	}

	bool succeeded = true;
	if (!PostLoad())
	{
		succeeded = false;
	}

	return succeeded;
}
Ejemplo n.º 8
0
CSoundItem::CSoundItem(CSoundData* sndData)
{
	ResetVars();
	if (InitOpenAL())
		Attach(sndData);
}
Ejemplo n.º 9
0
MythRenderOpenGL1::MythRenderOpenGL1(const QGLFormat& format, QPaintDevice* device)
  : MythRenderOpenGL(format, device, kRenderOpenGL1)
{
    ResetVars();
    ResetProcs();
}
Ejemplo n.º 10
0
CSoundItem::CSoundItem()
{
	ResetVars();
}
Ejemplo n.º 11
0
ObjBase::ObjBase(int x, int y)
{
	ResetVars();
	Vertex v(x, y);
	params.coords = v;
}
Ejemplo n.º 12
0
ObjBase::ObjBase(Vertex start_coords)
{
	ResetVars();
	params.coords = start_coords;
}
Ejemplo n.º 13
0
CSoundBase::CSoundBase()
{
    ResetVars();
}
Ejemplo n.º 14
0
CIteratorVars::CIteratorVars()
{
	ResetVars();
}
Ejemplo n.º 15
0
MythRenderOpenGL2::MythRenderOpenGL2(const QGLFormat& format, RenderType type)
  : MythRenderOpenGL(format, type)
{
    ResetVars();
    ResetProcs();
}
Ejemplo n.º 16
0
MythRenderOpenGL1::MythRenderOpenGL1(const QGLFormat& format)
  : MythRenderOpenGL(format, kRenderOpenGL1)
{
    ResetVars();
    ResetProcs();
}
Ejemplo n.º 17
0
MythRenderOpenGL2::MythRenderOpenGL2(const QGLFormat& format)
  : MythRenderOpenGL(format)
{
    ResetVars();
    ResetProcs();
}