test_class.file: jtss/src/test/java/ec/tss/disaggregation/documents/MultiCholetteDocumentTest.java
test_class.identifier: MultiCholetteDocumentTest
test_case.body: @Test
      public void testRedundantContemporaneous() {
           int N = 10;
          Matrix M = new Matrix(240, N * N);
          M.randomize();
          Ts[] s = new Ts[N * N];
          TsVariables vars=new TsVariables();
          TsPeriod start = new TsPeriod(TsFrequency.Monthly, 1980, 0);
          for (int i = 0; i < N * N; ++i) {
              TsData data=new TsData(start, M.column(i));
              vars.set("s" + i , new TsVariable(data));
          }
          // create the specs
          MultiCholetteSpecification spec = new MultiCholetteSpecification();
          // put unbinding constraints
          for (int i = 0; i < N; ++i) {
              StringBuilder str=new StringBuilder();
              str.append(.5 * N).append('=');
              int[] ids = new int[N];
              for (int j = 0; j < N; ++j) {
                  str.append("+s").append(i + N * j);
              }
              spec.addConstraint(str.toString());
          }
          for (int i = 0; i < N ; ++i) {
              StringBuilder str=new StringBuilder();
              str.append(.5 * N).append('=');
              for (int j = 0; j < N; ++j) {
                  str.append("+s").append(j + N * i);
              }
              spec.addConstraint(str.toString());
          }
          spec.addConstraint("0=s2+2*s6-s10-s18");
          spec.addConstraint("0=s4+2*s11-s18");
  
          //spec.getParameters().setRho(.8);
          MultiCholetteDocument doc = new MultiCholetteDocument();
          
          doc.setInput(vars);
          doc.setSpecification(spec);
          MultiBenchmarkingResults results = doc.getResults();
          for (int j = 0; j < N; ++j) {
              TsData S = null;
              for (int i = 0; i < N; ++i) {
                  S = TsData.add(S, results.getData("benchmarked.s" + (i + N * j), TsData.class));
              }
              DescriptiveStatistics stat = new DescriptiveStatistics(S);
              assertTrue(Math.abs(stat.getAverage() - .5 * N) < 1e-6);
              assertTrue(stat.getStdev() < 1e-9);
  //            System.out.println(stat.getStdev());
          }
          for (int j = 0; j < N; ++j) {
              TsData S = null;
              for (int i = 0; i < N; ++i) {
                  S = TsData.add(S, results.getData("benchmarked.s" + (N * i + j), TsData.class));
              }
              DescriptiveStatistics stat = new DescriptiveStatistics(S);
              assertTrue(Math.abs(stat.getAverage() - .5 * N) < 1e-6);
              assertTrue(stat.getStdev() < 1e-9);
  //            System.out.println(stat.getStdev());
          }
          TsData S = results.getData("benchmarked.s2", TsData.class);
          S = TsData.add(S, results.getData("benchmarked.s6", TsData.class).times(2));
          S = TsData.subtract(S, results.getData("benchmarked.s10", TsData.class));
          S = TsData.subtract(S, results.getData("benchmarked.s18", TsData.class));
  
          DescriptiveStatistics stat = new DescriptiveStatistics(S);
          assertTrue(Math.abs(stat.getAverage()) < 1e-6);
          assertTrue(stat.getStdev() < 1e-9);
          
          MultiCholetteDocument clone = doc.clone();
          assertTrue(clone.getResults() != null);
      }
test_case.class_method_signature: MultiCholetteDocumentTest.testRedundantContemporaneous()
test_case.full_signature: @Test public void testRedundantContemporaneous()
test_case.identifier: testRedundantContemporaneous
test_case.invocations: randomize column set append append append append addConstraint toString append append append append addConstraint toString addConstraint addConstraint setInput setSpecification getResults add getData assertTrue abs getAverage assertTrue getStdev add getData assertTrue abs getAverage assertTrue getStdev getData add times getData subtract getData subtract getData assertTrue abs getAverage assertTrue getStdev clone assertTrue getResults
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRedundantContemporaneous()
focal_class.declarator: factory_
focal_class.modifier: private final
focal_class.original_string: private final MultiCholetteProcessor factory_;
focal_class.type: MultiCholetteProcessor
focal_class.var_name: factory_
focal_class.file: jtss/src/main/java/ec/tss/disaggregation/documents/MultiCholetteDocument.java
focal_class.identifier: MultiCholetteDocument
focal_class.interfaces: implements Cloneable
focal_class.class_method_signature: MultiCholetteDocument.MultiCholetteDocument()
focal_class.full_signature: public  MultiCholetteDocument()
focal_class.identifier: MultiCholetteDocument
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  MultiCholetteDocument()
focal_class.class_method_signature: MultiCholetteDocument.MultiCholetteDocument(ProcessingContext context)
focal_class.full_signature: public  MultiCholetteDocument(ProcessingContext context)
focal_class.identifier: MultiCholetteDocument
focal_class.modifiers: public
focal_class.parameters: (ProcessingContext context)
focal_class.signature:  MultiCholetteDocument(ProcessingContext context)
focal_class.class_method_signature: MultiCholetteDocument.setVariables(TsVariables vars)
focal_class.full_signature: public void setVariables(TsVariables vars)
focal_class.identifier: setVariables
focal_class.modifiers: public
focal_class.parameters: (TsVariables vars)
focal_class.return: void
focal_class.signature: void setVariables(TsVariables vars)
focal_class.class_method_signature: MultiCholetteDocument.clone()
focal_class.full_signature: @Override public MultiCholetteDocument clone()
focal_class.identifier: clone
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: MultiCholetteDocument
focal_class.signature: MultiCholetteDocument clone()
focal_class.class_method_signature: MultiCholetteDocument.write(boolean verbose)
focal_class.full_signature: @Override public InformationSet write(boolean verbose)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (boolean verbose)
focal_class.return: InformationSet
focal_class.signature: InformationSet write(boolean verbose)
focal_class.class_method_signature: MultiCholetteDocument.read(InformationSet info)
focal_class.full_signature: @Override public boolean read(InformationSet info)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (InformationSet info)
focal_class.return: boolean
focal_class.signature: boolean read(InformationSet info)
focal_class.class_method_signature: MultiCholetteDocument.recalc(MultiCholetteSpecification spec, TsVariables input)
focal_class.full_signature: @Override protected MultiBenchmarkingResults recalc(MultiCholetteSpecification spec, TsVariables input)
focal_class.identifier: recalc
focal_class.modifiers: @Override protected
focal_class.parameters: (MultiCholetteSpecification spec, TsVariables input)
focal_class.return: MultiBenchmarkingResults
focal_class.signature: MultiBenchmarkingResults recalc(MultiCholetteSpecification spec, TsVariables input)
focal_class.class_method_signature: MultiCholetteDocument.getDescription()
focal_class.full_signature: @Override public String getDescription()
focal_class.identifier: getDescription
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDescription()
focal_class.superclass: extends ActiveDocument<MultiCholetteSpecification, TsVariables, MultiBenchmarkingResults>
focal_method.body: @Override
      public MultiCholetteDocument clone() {
          MultiCholetteDocument cl = (MultiCholetteDocument) super.clone();
          return cl;
      }
focal_method.class_method_signature: MultiCholetteDocument.clone()
focal_method.full_signature: @Override public MultiCholetteDocument clone()
focal_method.identifier: clone
focal_method.invocations: clone
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: MultiCholetteDocument
focal_method.signature: MultiCholetteDocument clone()