Documentation of 'edu.hitsz.c102c.util.Util' Java class
Util
edu.hitsz.c102c.util

Class Util



  • public class Util
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static interface  Util.Operator
      ¾ØÕó¶ÔÓ¦ÔªËØÏà³ËʱÔÚÿ¸öÔªËØÉϵIJÙ×÷
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static Util.Operator digmod 
      static edu.hitsz.c102c.util.Util.OperatorOnTwo minus
      ¶¨Ò徨Õó¶ÔÓ¦ÔªËØµÄ¼õ·¨²Ù×÷
      static edu.hitsz.c102c.util.Util.OperatorOnTwo multiply
      ¶¨Ò徨Õó¶ÔÓ¦ÔªËØµÄ³Ë·¨²Ù×÷
      static Util.Operator one_value 
      static edu.hitsz.c102c.util.Util.OperatorOnTwo plus
      ¶¨Ò徨Õó¶ÔÓ¦ÔªËØµÄ¼Ó·¨²Ù×÷
    • Constructor Summary

      Constructors 
      Constructor and Description
      Util() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static int binaryArray2int(double[] array) 
      static double[][] cloneMatrix(double[][] matrix)
      ¸´ÖƾØÕó
      static double[][] convnFull(double[][] matrix, double[][] kernel)
      ¼ÆËãfullģʽµÄ¾í»ý
      static double[][] convnValid(double[][][][] matrix, int mapNoX, double[][][][] kernel, int mapNoY)
      Èýά¾ØÕóµÄ¾í»ý,ÕâÀïÒªÇóÁ½¸ö¾ØÕóµÄһάÏàͬ
      static double[][] convnValid(double[][] matrix, double[][] kernel)
      ¼ÆËãvalidģʽµÄ¾í»ý
      static java.lang.String fomart(double[] data) 
      static int getMaxIndex(double[] out)
      È¡×î´óµÄÔªËØµÄϱê
      static double[][] kronecker(double[][] matrix, Layer.Size scale)
      ¿ËÂÞÄÚ¿Ë»ý,¶Ô¾ØÕó½øÐÐÀ©Õ¹
      static void main(java.lang.String[] args) 
      static double[][] matrixOp(double[][] ma, double[][] mb, Util.Operator operatorA, Util.Operator operatorB, edu.hitsz.c102c.util.Util.OperatorOnTwo operator)
      Á½¸öά¶ÈÏàͬµÄ¾ØÕó¶ÔÓ¦ÔªËØ²Ù×÷,µÃµ½µÄ½á¹û·½·¨mbÖУ¬¼´mb[i][j] = (op_a ma[i][j]) op (op_b mb[i][j])
      static double[][] matrixOp(double[][] ma, Util.Operator operator)
      ¶Ôµ¥¸ö¾ØÕó½øÐвÙ×÷
      static void printMatrix(double[][] matrix) 
      static double[] randomArray(int len)
      Ëæ»ú³õʼ»¯Ò»Î¬ÏòÁ¿
      static double[][] randomMatrix(int x, int y, boolean b)
      Ëæ»ú³õʼ»¯¾ØÕó
      static int[] randomPerm(int size, int batchSize)
      Ëæ»úÅÅÁеijéÑù£¬Ëæ»ú³éÈ¡batchSize¸ö[0,size)µÄÊé
      static double[][] rot180(double[][] matrix)
      ¶Ô¾ØÕó½øÐÐ180¶ÈÐýת,ÊÇÔÚmatrixµÄ¸±±¾Éϸ´ÖÆ£¬²»»á¶ÔÔ­À´µÄ¾ØÕó½øÐÐÐÞ¸Ä
      static double[][] scaleMatrix(double[][] matrix, Layer.Size scale)
      ¶Ô¾ØÕó½øÐоùÖµËõС
      static double sigmod(double x) 
      static double sum(double[][] error)
      ¶Ô¾ØÕóÔªËØÇóºÍ
      static double[][] sum(double[][][][] errors, int j)
      ¶Ôerrors[...][j]ÔªËØÇóºÍ
      static void testRot180() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • plus

        public static final edu.hitsz.c102c.util.Util.OperatorOnTwo plus
        ¶¨Ò徨Õó¶ÔÓ¦ÔªËØµÄ¼Ó·¨²Ù×÷
      • multiply

        public static edu.hitsz.c102c.util.Util.OperatorOnTwo multiply
        ¶¨Ò徨Õó¶ÔÓ¦ÔªËØµÄ³Ë·¨²Ù×÷
      • minus

        public static edu.hitsz.c102c.util.Util.OperatorOnTwo minus
        ¶¨Ò徨Õó¶ÔÓ¦ÔªËØµÄ¼õ·¨²Ù×÷
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • printMatrix

        public static void printMatrix(double[][] matrix)
      • rot180

        public static double[][] rot180(double[][] matrix)
        ¶Ô¾ØÕó½øÐÐ180¶ÈÐýת,ÊÇÔÚmatrixµÄ¸±±¾Éϸ´ÖÆ£¬²»»á¶ÔÔ­À´µÄ¾ØÕó½øÐÐÐÞ¸Ä
        Parameters:
        matrix -
      • randomMatrix

        public static double[][] randomMatrix(int x,
                                              int y,
                                              boolean b)
        Ëæ»ú³õʼ»¯¾ØÕó
        Parameters:
        x -
        y -
        b -
        Returns:
      • randomArray

        public static double[] randomArray(int len)
        Ëæ»ú³õʼ»¯Ò»Î¬ÏòÁ¿
        Parameters:
        len -
        Returns:
      • randomPerm

        public static int[] randomPerm(int size,
                                       int batchSize)
        Ëæ»úÅÅÁеijéÑù£¬Ëæ»ú³éÈ¡batchSize¸ö[0,size)µÄÊé
        Parameters:
        size -
        batchSize -
        Returns:
      • cloneMatrix

        public static double[][] cloneMatrix(double[][] matrix)
        ¸´ÖƾØÕó
        Parameters:
        matrix -
        Returns:
      • matrixOp

        public static double[][] matrixOp(double[][] ma,
                                          Util.Operator operator)
        ¶Ôµ¥¸ö¾ØÕó½øÐвÙ×÷
        Parameters:
        ma -
        operator -
        Returns:
      • matrixOp

        public static double[][] matrixOp(double[][] ma,
                                          double[][] mb,
                                          Util.Operator operatorA,
                                          Util.Operator operatorB,
                                          edu.hitsz.c102c.util.Util.OperatorOnTwo operator)
        Á½¸öά¶ÈÏàͬµÄ¾ØÕó¶ÔÓ¦ÔªËØ²Ù×÷,µÃµ½µÄ½á¹û·½·¨mbÖУ¬¼´mb[i][j] = (op_a ma[i][j]) op (op_b mb[i][j])
        Parameters:
        ma -
        mb -
        operatorB - ÔÚµÚmb¾ØÕóÉϵIJÙ×÷
        operatorA - ÔÚma¾ØÕóÔªËØÉϵIJÙ×÷
        Returns:
      • kronecker

        public static double[][] kronecker(double[][] matrix,
                                           Layer.Size scale)
        ¿ËÂÞÄÚ¿Ë»ý,¶Ô¾ØÕó½øÐÐÀ©Õ¹
        Parameters:
        matrix -
        scale -
        Returns:
      • scaleMatrix

        public static double[][] scaleMatrix(double[][] matrix,
                                             Layer.Size scale)
        ¶Ô¾ØÕó½øÐоùÖµËõС
        Parameters:
        matrix -
        scaleSize -
        Returns:
      • convnFull

        public static double[][] convnFull(double[][] matrix,
                                           double[][] kernel)
        ¼ÆËãfullģʽµÄ¾í»ý
        Parameters:
        matrix -
        kernel -
        Returns:
      • convnValid

        public static double[][] convnValid(double[][] matrix,
                                            double[][] kernel)
        ¼ÆËãvalidģʽµÄ¾í»ý
        Parameters:
        matrix -
        kernel -
        Returns:
      • convnValid

        public static double[][] convnValid(double[][][][] matrix,
                                            int mapNoX,
                                            double[][][][] kernel,
                                            int mapNoY)
        Èýά¾ØÕóµÄ¾í»ý,ÕâÀïÒªÇóÁ½¸ö¾ØÕóµÄһάÏàͬ
        Parameters:
        matrix -
        kernel -
        Returns:
      • sigmod

        public static double sigmod(double x)
      • sum

        public static double sum(double[][] error)
        ¶Ô¾ØÕóÔªËØÇóºÍ
        Parameters:
        error -
        Returns:
        ×¢ÒâÕâ¸öÇóºÍºÜ¿ÉÄÜ»áÒç³ö
      • sum

        public static double[][] sum(double[][][][] errors,
                                     int j)
        ¶Ôerrors[...][j]ÔªËØÇóºÍ
        Parameters:
        errors -
        j -
        Returns:
      • binaryArray2int

        public static int binaryArray2int(double[] array)
      • testRot180

        public static void testRot180()
      • main

        public static void main(java.lang.String[] args)
      • getMaxIndex

        public static int getMaxIndex(double[] out)
        È¡×î´óµÄÔªËØµÄϱê
        Parameters:
        out -
        Returns:
      • fomart

        public static java.lang.String fomart(double[] data)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.