Examples of Arguments


Examples of stallone.util.Arguments

                    + "-submatrix <C> <states>\n\n"
                    + "-populousSet <C> <minCount> <minIn> <minOut>"
                    );
            System.exit(0);
        }
        Arguments arg = new Arguments(args);

        if (arg.hasCommand("estimate"))
        {
            List<String> inputfiles = io.listFileNames(arg.getArgument("estimate"));
            List<IIntArray> dtrajs = intseq.loadIntSequences(inputfiles);

            int lag = 1;
            if (arg.hasCommand("lag"))
            {
                lag = arg.getIntArgument("lag");
            }
           
            IDoubleArray C = null;
            if (arg.hasCommand("sampleLag"))
            {
                C = msm.estimateCstepping(dtrajs, lag);
            }
            else
            {
                C = msm.estimateC(dtrajs, lag);
            }
           
            if (arg.hasCommand("countrev"))
            {
                C = alg.addWeightedToNew(0.5, C, 0.5, alg.transposeToNew(C));
            }

            if (arg.hasCommand("subset"))
            {
                IIntArray S = intseq.loadIntSequence(arg.getArgument("subset"));
                C = C.view(S.getArray(), S.getArray());
            }

            doubles.writeMatrixSparse(C, System.out);
        }
        if (arg.hasCommand("submatrix"))
        {
            IDoubleArray C = doublesNew.fromFile(arg.getArgument("submatrix", 0));
            IIntArray S = intseq.loadIntSequence(arg.getArgument("submatrix", 1));
            C = C.view(S.getArray(), S.getArray());
            doubles.writeMatrixSparse(C, System.out);
        }
        if (arg.hasCommand("populousSet"))
        {
            IDoubleArray C = doublesNew.fromFile(arg.getArgument("populousSet", 0));
            int n = C.rows();
            double minCount = arg.getIntArgument("populousSet",1);
            double minIn = arg.getIntArgument("populousSet",2);
            double minOut = arg.getIntArgument("populousSet",3);

            IDoubleArray counts = alg.rowSums(C);
            IDoubleArray ins = alg.columnSums(C);
            IDoubleArray outs = alg.rowSums(C);
            for (int i=0; i<n; i++)
View Full Code Here

Examples of structures.Arguments

  
   public static boolean initialize( String[] args )
   {
      boolean criticalError = false;
     
      Arguments arguments = new Arguments( args );
     
      System.out.println( arguments.toString( ) );
     
      documents = arguments.getFreeArgs( );
     
      alwaysUsingContext  =   arguments.contains( VALID_ARGS[ ARG_ALL_CONTEXT        ] );
      usingContext        = ! arguments.contains( VALID_ARGS[ ARG_NO_CONTEXT         ] );
      usingEveryContext   =   arguments.contains( VALID_ARGS[ ARG_EVERY_CONTEXT      ] );
      discardingTricky    =   arguments.contains( VALID_ARGS[ ARG_DISCARD_TRICKY     ] );
      matchingIncludeOnly =   arguments.contains( VALID_ARGS[ ARG_MATCH_INCLUDE_ONLY ] );
      usingParsableOutput =   arguments.contains( VALID_ARGS[ ARG_PARSABLE_OUTPUT    ] );
      showingTable        = ! arguments.contains( VALID_ARGS[ ARG_NO_TABLE           ] );
     
      List< String > includeLists = arguments.get( VALID_ARGS[ ARG_INCLUDE_LIST ] );
      List< String > excludeLists = arguments.get( VALID_ARGS[ ARG_EXCLUDE_LIST ] );
      List< String > trickyLists  = arguments.get( VALID_ARGS[ ARG_TRICKY_LIST  ] );
     
      List< String > maxThreadsArgs = arguments.get( VALID_ARGS[ ARG_MAX_THREADS ] );
     
      if( maxThreadsArgs != null && maxThreadsArgs.size( ) != 0 )
      {
         String lastArg = maxThreadsArgs.get( maxThreadsArgs.size( ) - 1 );
        
View Full Code Here

Examples of util.Arguments

   // Main
   //

    /** Main program entry point. */
    public static void main(String argv[]) {
        Arguments argopt = new Arguments();
        argopt.setUsage( new String[] {
                             "usage: java dom.DOMWriter (options) uri ...","",
                             "options:",
                             "  -n | -N  Turn on/off namespace [default=on]",
                             "  -v | -V  Turn on/off validation [default=off]",
                             "  -s | -S  Turn on/off Schema support [default=on]",
                             "  -d | -D  Turn on/off deferred DOM [default=on]",
                             "  -c       Canonical XML output.",
                             "  -h       This help screen.",
                             "  -e       Output Java Encoding.",
                             "           Default encoding: UTF-8"} );



        // is there anything to do?
        if ( argv.length == 0 ) {
            argopt.printUsage();
            System.exit(1);
        }

        // vars
        String  parserName = DEFAULT_PARSER_NAME;
        boolean canonical  = false;
        String  encoding   = "UTF8"; // default encoding

        argopt.parseArgumentTokens(argv, new char[] { 'p', 'e'} );

        int   c;
        String arg = null;
        while ( ( arg =  argopt.getlistFiles() ) != null ) {

            outer:
            while ( (c =  argopt.getArguments()) != -1 ){
                switch (c) {
                case 'c':
                    canonical = true;
                    break;
                case 'e':
                    encoding      = argopt.getStringParameter();
                    if ( encoding != null && isValidJavaEncoding( encoding ) )
                        setWriterEncoding( encoding );
                    else {
                        printValidJavaEncoding();
                        System.exit( 1 );
                    }
                    break;
                case 'v':
                    setValidation = true;
                    break;
                case 'V':
                    setValidation = false;
                    break;
                case 'N':
                    setNameSpaces = false;
                    break;
                case 'n':
                    setNameSpaces = true;
                    break;
                case 'p':
                    parserName    = argopt.getStringParameter();
                    break;
                case 'd':
                    setDeferredDOM = true;
                    break;
                case 'D':
                    setDeferredDOM = false;
                    break;
                case 's':
                    setSchemaSupport = true;
                    break;
                case 'S':
                    setSchemaSupport = false;
                    break;
                case '?':
                case 'h':
                case '-':
                    argopt.printUsage();
                    System.exit(1);
                    break;
                case -1:
                    break outer;
                default:
View Full Code Here

Examples of water.init.Arguments

    // Record system start-time.
    if( !START_TIME_MILLIS.compareAndSet(0L, System.currentTimeMillis()) )
      return;                   // Already started

    // Parse args
    new Arguments(args).extract(ARGS);

    // Get ice path before loading Log or Persist class
    String ice = DEFAULT_ICE_ROOT();
    if( ARGS.ice_root != null ) ice = ARGS.ice_root.replace("\\", "/");
    try {
View Full Code Here
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.