<commit_before>package org.eclipse.scanning.api.points.models;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;

import org.eclipse.scanning.api.points.IMutator;
/**
 * This class is designed to encapsulate the information
 * to required to provide all the locations, with regions
 * of an n-Dimensional scan.
 * 
 * <pre>
 * CompoundModel {
 *     models:  [ list of models]
 *     regions: [ list of regions]
 *     mutators: [ list of mutators ]
 * }
 * Region {
 *     roi: geometric roi
 *     scannables: [ list of scannable names]   
 * }
 * </pre>
 * <b>Example:</b><p>
 * <pre>
 * CompoundModel {
 *     models : [
 *         {type: SpiralModel
 *          fastAxisName: x
 *          slowAxisName: y
 *          ...
 *         }
 *     ]
 *     regions : [
 *        {
 *          roi : {type: CircularROI
 *           centre: [0,1]
 *           radius: 2
 *          }
 *          scannables: ["x", "y"]
 *        }
 *     ]
 *     mutators : [
 *        {
 *           FixedDurationMutator: {
 *            duration: 23.1
 *           }
 *        }
 *     ]
 * }   
 *    
 * 
 * </pre>
 * 
 * @author <NAME>
 *
 */
public class CompoundModel<R> implements Cloneable {

	private List<Object>               models;
	private Collection<ScanRegion<R>>  regions;
	private List<IMutator>	           mutators;
	
	public CompoundModel() {
		// Must have no-arg constructor
	}
	
	/**
	 * Clones the outer object but not the indder collections
	 * of models, regions etc.
	 */
	public CompoundModel<R> clone() {
		CompoundModel<R> ret = new CompoundModel();
		ret.models = models;
		ret.regions = regions;
		ret.mutators = mutators;
		return ret;
	}
	/**
	 * Clones the outer object but not the indder collections
	 * of models, regions etc.<commit_msg>[DAQ-355] fix spelling mistake indder -> inner<commit_after>package org.eclipse.scanning.api.points.models;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;

import org.eclipse.scanning.api.points.IMutator;
/**
 * This class is designed to encapsulate the information
 * to required to provide all the locations, with regions
 * of an n-Dimensional scan.
 * 
 * <pre>
 * CompoundModel {
 *     models:  [ list of models]
 *     regions: [ list of regions]
 *     mutators: [ list of mutators ]
 * }
 * Region {
 *     roi: geometric roi
 *     scannables: [ list of scannable names]   
 * }
 * </pre>
 * <b>Example:</b><p>
 * <pre>
 * CompoundModel {
 *     models : [
 *         {type: SpiralModel
 *          fastAxisName: x
 *          slowAxisName: y
 *          ...
 *         }
 *     ]
 *     regions : [
 *        {
 *          roi : {type: CircularROI
 *           centre: [0,1]
 *           radius: 2
 *          }
 *          scannables: ["x", "y"]
 *        }
 *     ]
 *     mutators : [
 *        {
 *           FixedDurationMutator: {
 *            duration: 23.1
 *           }
 *        }
 *     ]
 * }   
 *    
 * 
 * </pre>
 * 
 * @author <NAME>
 *
 */
public class CompoundModel<R> implements Cloneable {

	private List<Object>               models;
	private Collection<ScanRegion<R>>  regions;
	private List<IMutator>	           mutators;
	
	public CompoundModel() {
		// Must have no-arg constructor
	}
	
	/**
	 * Clones the outer object but not the indder collections
	 * of models, regions etc.
	 */
	public CompoundModel<R> clone() {
		CompoundModel<R> ret = new CompoundModel();
		ret.models = models;
		ret.regions = regions;
		ret.mutators = mutators;
		return ret;
	}
	/**
	 * Clones the outer object but not the inner collections
	 * of models, regions etc.
{'fraction_non_alphanumeric': 0.12367584745762712, 'fraction_numerical': 0.003972457627118644, 'mean_word_length': 2.0732302685109847, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 34, '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': '5400126', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1181, 'n_words': 304}