//Euler 函数前n项和 /* phi(n) 为n的Euler原函数 if( (n/p) % i == 0 ) phi(n)=phi(n/p)*i else phi(n)=phi(n/p)*(i-1) 对于约数:divnum 如果i|pr[j] 那么 divnum[i*pr[j]]=divsum[i]/(e[i]+1)*(e[i]+2) //最小素因子次数加1 否则 divnum[i*pr[j]]=divnum[i]*divnum[pr[j]] //满足积性函数条件 对于素因子的幂次 e[i] 如果i|pr[j] e[i*pr[j]]=e[i]+1 //最小素因子次数加1 否则 e[i*pr[j]]=1 //pr[j]为1次 对于本题: 1. 筛素数的时候首先会判断i是否是素数。 根据定义,当 x 是素数时 phi[x] = x-1 因此这里我们可以直接写上 phi[i] = i-1 2. 接着我们会看prime[j]是否是i的约数 如果是,那么根据上述推导,我们有:phi[ i * prime[j] ] = phi[i] * prime[j] 否则 phi[ i * prime[j] ] = phi[i] * (prime[j]-1) (其实这里prime[j]-1就是phi[prime[j]],利用了欧拉函数的积性) 经过以上改良,在筛完素数后,我们就计算出了phi[]的所有值。 我们求出phi[]的前缀和 */
上传时间: 2016-12-31
上传用户:gyq
This application note describes a Linear Technology "Half-Flash" A/D converter, the LTC1099, being connected to a 256 element line scan photodiode array. This technology adapts itself to handheld (i.e., low power) bar code readers, as well as high resolution automated machine inspection applications..
上传时间: 2013-11-21
上传用户:lchjng
高压双管反激变换器的设计:介绍一种双管反激的电路拓扑,分析了其工作原理,给出了一些关键技术参数的计算公式,设计并研制成功的30W 380V AC5 0H z/510V DC/+15.1 V DC(1A )、+5.2VDC(2A)辅助开关电源具有功率密度高、变换效率高、可靠性高等优良的综合性能。该变换器在高电压输人情况下有重要的应用价值。【关 键 词 】变换器,辅助开关电源,双管反激 [Abstract】 A n e wt opologyfo rd oubles witchfl ybackc onverteris in troduced.Th eo perationp rincipleis a nalyzeda nds ome for mulas for calculating key parameters for the topology are presented. The designed and produced auxiliary switching power supply,i. e. 30W 380V AC5 0H z/5 10V DC/+15.1 V DC《1A )、+5.2 V DC《2A ),hase xcellentc omprehensivep erformances sucha sh ighp owerd ensity, hi ghc onversione fficiencya ndh ighr eliability.Th isc onverterh asim portanta pplicationv aluef orh igh input voltag [Keywords ]converter,au xiliary switchingp owers upply,do ubles witchf lybac
上传时间: 2013-11-01
上传用户:Ants
基于多点网络的水厂自动监控系统设计Design of MPI Based Automatic Monitoring and Control System in Water Works刘 美 俊(湖南工程学院,湘潭411101)摘要针对水厂工作水泵多、现场离控制站距离远的特点,提出了一种基于MPI多点网络的自动监控系统的设计方法,分析了系统的工作原理,介绍了系统中数据的采集与处理、主站与从站的通信原理以及系统软件的设计。由于这种系统的主、从站PLC之间采用MPI网络通信,具有运行可靠、性能价格比高的特点,所以适用于中小规模水厂的分布式监控场合。关键词多点网络主站从站监控系统Abstract Ina ccordancew ithth efe atuersof w aterw orks,i. e. ,manyp umpsin o perationa ndth ep umps, farfor mt hec ontrolst ation,th em ethodo fdesigninga na utomati(〕monitoringa ndc ontorlsy stemb asedo nM PIis p resented.Th eo perationalpr incipleo fth esy stemi san alyzed,th ed atac olection,data processing; communication between master station and slave station as wel as design and system software are discussed. Because MPI network communicationis used among master station, slave stations and PLC, the system is reliable and high cost-efective. It is, suitable for smal and mediumsized water works for distrbuted monitoring and control.Keywords MPI Masterst ation Slaves tation Monitoringa ndc ontorlsy stem 自来 水 厂 的自动控制系统一般分为两大部分,一对组态硬件要求较高,投资较大。相对而言,MPI网是水源地深水泵的工作控制,一是水厂区变频恒压供络速度可达187.5 M bps,通过一级中继器传输距离可水控制,两部分的实际距离通常都比较远。某厂水源达Ikm 。根据水厂的具体情况,确定以MPI方式组地有3台深井泵给水厂区的蓄水池供水。水厂区的成网络,主站PLC为S7-300系列的CPU3121FM,从任务是对水池的水进行消毒处理后,通过加压泵向管站为S7-200系列的CPU222。这样既满足了系统要路恒压供水。选用Siemens公司的S7系列可编程控求,又相对于Profibus网络节省了三分之一的成本,制器(PLC)和上位机组成实时数据采集和监控系统, 这种分布式监控系统具有较高的性能价格比。系统对深水泵进行远程控制,对供水泵采用变频器进行恒中PLC的物理层采用RS - 485接口,网络延伸选用压控制以保证整个水厂的电机设备安全、可靠地运带防雷保护的中继器,使系统的安全运行得到了保行。证。MPI网络的拓扑结构如图1所示。1 多点网络(NWI)监控系统的组成Sie me ns 公司S7系列PLC通常有MP」多点网络与Profibus现场总线网络两种组网方式。Profibus现场总线的应用目前较为普遍,通用性较好,它由Profibus一DP, Profibus一FMS, Profibus一PA组成。Profibus - DP型用于分散外设间的数据传输,传输速率为9.6kbps一12Mbps,主要用于现场控制器与分散1/0之间的通信,可满足交直流调速系统快速响应的时间要求,特别适合于加工自动化领域的应用;Profibus - FMS主要解决车间级通信问题,完成中等传输速度的循环或非循环数据交换任务,适用于纺织、楼宇自动化、可编程控制器、低压开关等;Profibus - PA型采用了OSI模型的物理层和数据链路层,适用于过程自动化的总线类型。
上传时间: 2013-10-09
上传用户:fac1003
Abstract: This application note illustrates the flexibility of the MAX7060 ASK/FSK transmitter. While the currently available evaluationkit (EV kit) has been optimized for the device's use in a specific frequency band (i.e., 288MHz to 390MHz), this document addresseshow the EV kit circuitry can be modified for improved operation at 433.92MHz, a frequency commonly used in Europe. Twoalternative match and filter configurations are presented: one for optimizing drain efficiency, the other for achieving higher transmitpower. Features and capabilities of earlier Maxim industrial, scientific, and medical radio-frequency (ISM-RF) transmitters areprovided, allowing comparison of the MAX7060 to its predecessors. Several design guidelines and cautions for using the MAX7060are discussed.
上传时间: 2013-11-14
上传用户:swaylong
介绍几种cpuThe 8xC251SA/SB/SP/SQ improves on the MCS-51 architecture and peripheral features, introducing the advanced register based CPU architecture i.e., the MCS 251 microcontroller architecture. The register based CPU supports a 40-byte register file. In addition, the 8xC251SA/SB/SP/SQ microcontroller has 256-Kbyte expanded external code/data memory space and 64-Kbyte stack space. The new controller is also specially designed to execute C code efficiently. More importantly, the 8xC251SA/SB/SP/SQ maintains binary code compatibility with MCS 51 microcontrollers but at the same time allows the use of the powerful MCS 251 microcontroller instruction set, with many new 8, 16 and 32 bit instructions available. The 8xC251SA/SB/SP/SQ has 512 bytes or 1 Kbyte of on-chip data RAM options and is available in 16 Kbytes and 8 Kbytes of on-chip ROM/OTPROM or ROMless options.
标签: architecture introducin peripheral improves
上传时间: 2015-03-15
上传用户:ccclll
This a Bayesian ICA algorithm for the linear instantaneous mixing model with additive Gaussian noise [1]. The inference problem is solved by ML-II, i.e. the sources are found by integration over the source posterior and the noise covariance and mixing matrix are found by maximization of the marginal likelihood [1]. The sufficient statistics are estimated by either variational mean field theory with the linear response correction or by adaptive TAP mean field theory [2,3]. The mean field equations are solved by a belief propagation method [4] or sequential iteration. The computational complexity is N M^3, where N is the number of time samples and M the number of sources.
标签: instantaneous algorithm Bayesian Gaussian
上传时间: 2013-12-19
上传用户:jjj0202
The tar file contains the following files: ptfsf.c: heart of the perfect TFSF code ptfsf.h: header file for same ptfsf-demo.c: FDTD code which demonstrates use of perfect TFSF code. Essentially this program used to generate results shown in the paper ptfsf-file-maker.c: code to generate an incident-field file using the "perfect" incident fields ptfsf-demo-file.c: FDTD code which uses the perfect incident fields stored in a file fdtdgen.h: defines macros used in much of my code Makefile: simple make-file to compile programs Also include are some simple script files to run the programs with reasonable values. The code assumes a two-dimensional computational domain with TMz polarization (i.e., non-zero field Ez, Hx, and Hy). The program is currently written so that the incident field always strikes the lower-left corner of the total-field region first. (If you want a different corner, that should be a fairly simple tweak to the code, but for now you ll have to make that tweak yourself.)
标签: ptfsf following the contains
上传时间: 2013-11-28
上传用户:风之骄子
寻找函数的全局极小值,global minimization of contrast function with random restarts the data are assumed whitened (i.e. with identity covariance matrix). The output is such that Wopt*x are the independent sources.
上传时间: 2013-12-15
上传用户:康郎
DIGITAL IMAGERY is pervasive in our world today. Consequently, standards for the efficient representation and interchange of digital images are essential. To date, some of the most successful still image compression standards have resulted from the ongoing work of the Joint Photographic Experts Group (JPEG). This group operates under the auspices of Joint Technical Committee 1, Subcommittee 29, Working Group 1 (JTC 1/SC 29/WG 1), a collaborative effort between the International Organization for Standardization (ISO) and International Telecommunication Union Standardization Sector (ITUT). Both the JPEG [1–3] and JPEG-LS [4–6] standards were born from the work of the JPEG committee. For the last few years, the JPEG committee has been working towards the establishment of a new standard known as JPEG 2000 (i.e., ISO/IEC 15444). The fruits of these labors are now coming to bear, as JPEG-2000 Part 1 (i.e., ISO/IEC 15444-1 [7]) has recently been approved as a new international standard.
标签: Consequently efficient pervasive standards
上传时间: 2013-12-21
上传用户:源弋弋