Beispiel #1
0
	    private void selectSamples (SampleSelect matches, int arg)
	    {
	        SelectSampleActionArg actionArg = new SelectSampleActionArg();
	
	        for ( int i = 0; i < MAX_INSTANCE; i++ ) {
	            actionArg.matches = matches;
	            actionArg.instanceData = instanceDataList[i];
	            actionArg.instanceData.expected = new LinkedList<SampleData>();
	            actionArg.mrs = null;
	            actionArg.mrsic = null;
	            actionArg.rank = 0;
	            actionArg.arg = arg;
	            
	            foreach (SampleData sampleData in instanceDataList[i].samples) {
	                selectSampleAction(sampleData, actionArg);
	            }
	
	            determineGenerationRank(actionArg.instanceData,
	                                    actionArg.mrs,
	                                    actionArg.mrsic);
	        }
	    }
Beispiel #2
0
	    private void selectSampleAction(SampleData sampleData, SelectSampleActionArg a)
	    {
	        if (sampleData != null) {
	            if ( a.mrs == null ) {
	                a.mrs = sampleData;
	            }
	            if ( a.matches.matches(sampleData, a.arg) ) {
	                if ( a.mrsic == null ) {
	                    a.mrsic = sampleData;
	                }
	                sampleData.ViewState     = a.instanceData.viewState;
	                sampleData.InstanceState = a.instanceData.instanceState;
	                sampleData.SampleRank    = a.rank++;
	                sampleData.GenerationRank = 0;
	                sampleData.AbsoluteGenerationRank = 0;
	                a.instanceData.expected.AddFirst(sampleData);
	                sampleData.seen = false;
	            }
	        }
	    }