コード例 #1
0
        /// <summary>四元数第3成分</summary>
        public static Tensor QuaternionJ(Tensor x)
        {
            Function function = new Functions.Quaternion.QuaternionJ();

            Shape y_shape = function.OutputShapes(x.Shape)[0];

            Tensor y = new Tensor(y_shape);

            function.Execute(new Tensor[] { x }, new Tensor[] { y });

            return(y);
        }
コード例 #2
0
        /// <summary>四元数第3成分</summary>
        public static VariableNode QuaternionJ(VariableNode x)
        {
            Function function = new Functions.Quaternion.QuaternionJ();

            return(Apply(function, x)[0]);
        }