这是命令 PGAEncodeIntegerAsGrayCode,可以使用我们的多个免费在线工作站之一(例如 Ubuntu Online、Fedora Online、Windows 在线模拟器或 MAC OS 在线模拟器)在 OnWorks 免费托管提供商中运行
程序:
您的姓名
PGAEncodeIntegerAsGrayCode - 将实值编码为二进制反射格雷码序列
INPUT 有无库存
ctx - 上下文变量
p - 字符串索引
pop - 字符串所在人口的符号常量
start - p 中用于编码 val 的起始位位置
end - p 中的结束位位置以对 val 进行编码
val - 要表示为二进制反射格雷码序列的整数值
OUTPUT 有无库存
副作用。
概要
#include "pgapack.h"
void PGAEncodeIntegerAsGrayCode(ctx, p, pop, 开始, 结束, val)
PGA上下文 *ctx
输入法
流行音乐
整数开始
打算
整数值
地点
评估.c
例
对字符串 p 中的位位置 20--0 中的 19 位中的整数 v 进行编码
使用格雷码填充 PGA_NEWPOP。
PGA上下文 *ctx;
整数 v, p;
:
PGAEncodeIntegerAsGrayCode(ctx, p, PGA_NEWPOP, 0, 19, 7);
05/01/95 PGAEncodeIntegerAsGrayCode(1)
使用 onworks.net 服务在线使用 PGAEncodeIntegerAsGrayCode