Package polyofdm.cc.powercontrol

Source Code of polyofdm.cc.powercontrol.GeneratePDF

package polyofdm.cc.powercontrol;

import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

import polyofdm.chart.PdfGenerator;
import Jama.Matrix;

public class GeneratePDF {
 
  public static void main(String[] args) throws IOException {
    int allCarriers = 48;
   
    Set<Integer> cancellationCarriers = new HashSet<Integer>();
   

    cancellationCarriers.add(0);
    cancellationCarriers.add(1);
    cancellationCarriers.add(2);
    cancellationCarriers.add(3);
    cancellationCarriers.add(4);
    cancellationCarriers.add(5);
    cancellationCarriers.add(allCarriers-6);
    cancellationCarriers.add(allCarriers-5);
    cancellationCarriers.add(allCarriers-4);
    cancellationCarriers.add(allCarriers-3);
    cancellationCarriers.add(allCarriers-2);
    cancellationCarriers.add(allCarriers-1);
   
//    cancellationCarriers.add(3);
//    cancellationCarriers.add(6);
//    cancellationCarriers.add(9);
//    cancellationCarriers.add(12);


    PowerControlledCC cancellationCarrier = new PowerControlledCC(allCarriers, cancellationCarriers);   
   
    int usedSize = allCarriers-cancellationCarriers.size();
   
    for (int maxDegrees = 0; maxDegrees < cancellationCarriers.size(); maxDegrees++) {
      Matrix displayMatrix = new Matrix(usedSize, allCarriers);
      for (int basisVector = 0; basisVector < usedSize; basisVector++) {
        double[] usedData = new double[usedSize];
        usedData[basisVector] = 1;
        double[] allData = cancellationCarrier.getAssembledValuesMaxDegrees(usedData, maxDegrees);
        for (int i = 0; i < allCarriers; i++) {
          displayMatrix.set(basisVector, i, allData[i])
        }
      }
      System.out.println("Display Matrix");
      displayMatrix.print(15, 5);

      PdfGenerator.generatePDF(
          "CancellationCarrier_" + allCarriers + "used_" + cancellationCarriers.size() + "cc_" + maxDegrees + "degrees.pdf",
          displayMatrix,
          "Cancellation Carrier",
          allCarriers + " carriers used, " + (cancellationCarriers.size()) + " cc, " + maxDegrees + " degrees"
          )
     
    }
   

   
  }

}
TOP

Related Classes of polyofdm.cc.powercontrol.GeneratePDF

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.