联合开发网   搜索   要求与建议
                登陆    注册
排序按匹配   按投票   按下载次数   按上传日期
按分类查找All 数学计算(380) 
按平台查找All Visual C++(380) 

[数学计算] Rectangle

3. 声明一个名为Rectangle的矩形类,其属性为矩形的左下角和右上角两点的坐标,并有友元函数计算矩形的周长及面积。编程实现求左下角与右上角坐标分别为(2.1,3.2),(5.2,6.3)的矩形周长及面积。并编写一个友元类,类中的成员函数实现坐标点的显示。
3. Declare a class named Rectangle rectangle, and its property to the lower left and upper right corner of the rectangle coordinates of two points, and a friend function to calculate the perimeter and area of ​ ​ a rectangle. Programming and seek lower-left corner right corner coordinates are (2.1,3.2), (5.2,6.3) rectangular perimeter and area. And the preparation of a friend class, class member functions to display the coordinates of the point. (2014-01-02, Visual C++, 880KB, 下载2次)

http://www.pudn.com/Download/item/id/2441579.html

[数学计算] CPPexam6

1. 编写并测试 3×3 矩阵转置函数,使用数组保存 3×3 矩阵。 2. 使用动态内存分配生成动态数组来重新完成上题,使用指针实现函数的功能。 3. 编程实现两字符串的连接。要求使用字符数组保存字符串,不要使用系统函数。 4. 使用 string 类声明字符串对象,重新实现上一小题。 5. 声明一个Employee 类,其中包括姓名、街道地址、城市和邮编等属性,以及change_name()和 display()等函数。display()显示姓名、街道地址、城市和邮编等属性,change_name()改变对象的姓名属性,实现并测试这个类。 6. 声明包含 5 个元素的对象数组,每个元素都是 Employee 类型的对象。
1 write and test 33 matrix transpose function, use an array to save 33 matrix. (2) use of dynamic memory allocation dynamic array to re-generate the complete title, use the pointer to achieve the function does. 3 programming two string connections. Require the use of an array of characters stored string, do not use the system function. 4 Use the string class declaration string object on a small problem reimplement. 5. Declare an Employee class, which includes your name, street address, city and zip code and other attributes, as well change_name () and display () and other functions. display () displays the name, street address, city and zip code and other attributes, change_name () to change the name of the object attributes, implement and test this class. 6 The statement contains five elements of an array of objects, each element is an object of type Employee. (2013-11-22, Visual C++, 1029KB, 下载5次)

http://www.pudn.com/Download/item/id/2406700.html

[数学计算] programSave

1、问题描述:   设有n 个程序{1,2,…, n }要存放在长度为L的磁带上。程序i存放在磁带上的长度是i l , 1 ≤i ≤n。程序存储问题要求确定这n 个程序在磁带上的一个存储方案,使得能够在磁带上存储尽可能多的程序。对于给定的n个程序存放在磁带上的长度,编程计算磁带上最多可以存储的程序数。
1, Problem description: n procedures {1,2, ..., n} to be stored in the length L of the tape. I stored in the program on the tape length il, 1 ≤ i ≤ n. Program storage problem requires a procedure to determine the n on the tape a storage solution, so that the tape can store as many programs. For a given n procedures stored in the tape length, programming and calculation can be stored on the tape program number. (2013-09-10, Visual C++, 1KB, 下载4次)

http://www.pudn.com/Download/item/id/2351781.html

[数学计算] Onwards-continued-fraction-algorithm

提出了一种新的Mie散射算法。针对Mie散射系数计算中直接递推所存在的数据溢出问题, 对散射系数的递推公式进行改进, 以连分式形式进行计算,将两个关键函数分别向前递推, 避免了直接计算时贝塞尔函数值超出计算机最大数据限而造成的数据溢出问题。利用Matlab编程,分别计算了不同粒径参数和不同折射率情况下的散射光强分布,并对两种算法的模拟结果进行了分析比较。结果表明,在两种算法都有效的范围内这两种算法的计算结果完全相 符, 而改进的向前递推连分式算法用一个变量循环叠代就能完成连分式的计算, 展宽了使用范围, 不仅能够计算超大粒径参数散射, 而且算法对折射率虚部没有任何限制。
Proposed a new algorithm Mie scattering. Data overflow problem exists for the Mie scattering coefficient calculated directly recursive, recursive formula to improve on the scattering coefficient, calculated form of Continued Fractions forward two key functions are recursive, to avoid a direct calculation Bessel function value exceeds the the computer maximum data limit and data overflow problem. Using Matlab programming, different particle size parameters and scattering in the case of different refractive index were calculated light intensity distribution on the simulation results of the two algorithms are analyzed and compared. The results show that both algorithms are effective within the calculation of the results of these two algorithms entirely consistent improvement forward recursive the Continued Fractions algorithm with a variable loop iteration will be able to complete the calculation of the continued fraction, broadening the the scope of use, not only able to calculate the la (2013-04-09, Visual C++, 320KB, 下载16次)

http://www.pudn.com/Download/item/id/2192873.html

[数学计算] 1

问题描述: 一本书的页码从自然数1 开始顺序编码直到自然数n。书的页码按照通常的习惯编排,每个页码都不含多余的前导数字0。例如,第6 页用数字6 表示,而不是06 或006 等。数字计数问题要求对给定书的总页码n,计算出书的全部页码中分别用到多少次数字0,1,2,…,9。 编程任务: 给定表示书的总页码的10 进制整数n (1≤n≤109) 。编程计算书的全部页码中分别用到多少次数字0,1,2,…,9。 数据输入: 输入数据由文件名为input.txt的文本文件提供。 每个文件只有1 行,给出表示书的总页码的整数n。 结果输出: 程序运行结束时,将计算结果输出到文件output.txt中。输出文件共有10行,在第k行输出页码中用到数字k-1 的次数,k=1,2,…,10。
The description of the problem: the page of a book from the natural numbers sequentially coding until the natural number n. The page number of the book in accordance with the usual custom layout each page does not contain a the excess leading digital 0. For example, the first six with a digital 6 shows, rather than 06 or 006. The digital counting problem requires calculated the total page number n of a given book, full folio books were used how many times the numbers 0, 1, 2, ..., 9. Programming task: given to represent the total pages in the book decimal integer n (1 ≤ n ≤ 109). Full Page programming calculations were used how many times the numbers 0, 1, 2, ..., 9. Data input: input data from a text file called input.txt file. Each file is only one line given the said book page number integer n. The result output: the end of the program runs, the calculation results output to the file output.txt. The output file 10 lines in total, are used in the k-th row output page number of times (2013-03-28, Visual C++, 1KB, 下载1次)

http://www.pudn.com/Download/item/id/2176816.html

[数学计算] matGear

matlab作为一种强大的科学计算语言,其强大的计算能力和海量的函数工具包,把它作为后台计算语言嵌入到你的软件中去,可以省去繁杂的数学公式编程,是一种很好的计算资源。而matlab本身也提供了一组C语言API供程序调用。本文基于这组C语言API对MATLAB进行二次开发matGear,其目的只有一个:以更简便的方式,把MATLAB集成到自己的工程项目中去。
matlab as a powerful scientific computing language, powerful computing capacity and mass function tools package, it is calculated as a background language embedded in your software, eliminates the need for complicated mathematical formula programming, is a good computing resources. Matlab itself also provides a set of C language API for the procedure call. This article is based on the C language API MATLAB the secondary development matGear, for one purpose: an easier way to MATLAB integrated into their own projects. (2013-03-09, Visual C++, 431KB, 下载5次)

http://www.pudn.com/Download/item/id/2153519.html

[数学计算] transposed-matrix-

3. 编程序,按如下方法求A矩阵的转置矩阵B:输入两个正整数m和n,而后通过使用指针配合new运算符生成一个m行n列的二维动态数组A以及另一个n行m列的二维动态数组B,之后为A输入数据(A矩阵数据),进而求出其转置矩阵B(数据放动态数组B中)并输出结果。
Programmed transposed matrix B requirements matrix A as follows: Input two positive integers m and n, and then by using the pointer with the two-dimensional dynamic arrays A new operator to generate a m rows and n columns, as well as the other n rows and m columns, the two-dimensional dynamic array B, followed by the A input data (A matrix data), thereby obtaining the transfer matrix B (data put dynamic array B) and outputs the result. (2013-01-10, Visual C++, 1KB, 下载5次)

http://www.pudn.com/Download/item/id/2113056.html

[数学计算] lisanbiancheng

离散编程,求关系的传递闭包,真值表,求偏序关系的极大元与极小元,消解算法 求关系的传递闭包 输入 一次输入一个关系矩阵,每一行两个相邻元素之间用一个空格隔开,输入元素的行与列分别对应关系矩阵的行与列。 输出 输出该关系的传递闭包所对应的关系矩阵,要求格式与输入的格式相同。
Discrete programming, find the relationship between the transmission of closure, truth table, find the maximal element of the partial order relation minimizer, digestion transitive closure input to enter a relationship matrix algorithms to find relationships, each row of two adjacent elements between, separated by a space, input elements in rows and columns, respectively, corresponding to the relationship matrix of rows and columns. Output relationship matrix corresponding to the output of the transitive closure of the relations, the same format input format requirements. (2012-09-20, Visual C++, 6KB, 下载9次)

http://www.pudn.com/Download/item/id/1998194.html

[数学计算] At-least-the-issue-of-coins

有n种不同面值的硬币,各硬币面值存于数组T[1:n] 现用这些面值的钱来找钱;各面值的个数存在数组Coins[1:n]中。 对于给定的1<=n<=10,硬币面值数组、各面值的个数及钱数m,0<=m<=2001,编程计算找钱m的最少硬币数。
There are n different denominations of coins, each coin denomination stored in the array T [1: n] current face value of money with these find money the number of each denomination there are an array of Coins [1: n] in. For a given 1 < = n < = 10, an array of coin denominations, the denomination of the money number and the number m, 0 < = m < = 2001, m program calculate the minimum number of coins find money. (2011-06-30, Visual C++, 14KB, 下载6次)

http://www.pudn.com/Download/item/id/1585822.html

[数学计算] Frequency-picture-of-throwing-a-coin

问题的提出:编程模拟抛硬币所得正面的频率图。假设每次抛10次为一事件,记录每次得到正面的次数,共抛掷100000次,计算得到正面次数的概率发布,并绘图输出结果。 思路:数值概率算法常用于数值问题的求解,此类算法所得的往往是近似解,且近似解的精度随计算时间的增加而不断提高,得到一定精度近似解就可以满足问题要求。
Of the problem: a coin flip from positive programming analog frequency map. Assuming throw 10 times for each event, record the number of times each receive a positive, throwing a total of 100,000 times, the calculated probability of a positive number of releases, and graphics output. Ideas: Numerical probabilistic algorithms commonly used in solving numerical problems, such algorithms are often derived from the approximate solution and the accuracy of approximate solution with the increase of computing time rising to a certain precision of the approximate solution to meet the problem requirements. (2011-04-09, Visual C++, 137KB, 下载1次)

http://www.pudn.com/Download/item/id/1484421.html

[数学计算] Mysteryproblem

重排九宫是一个古老的单人智力游戏。据说重排九宫起源于我国古时由三国演义故事“关羽义释曹操”而设计的智力玩具“华容道”,后来流传到欧洲,将人物变成 数字。原始的重排九宫问题是这样的:将数字1~8按照任意次序排在3×3的方格阵列中,留下一个空格。与空格相邻的数字,允许从上,下,左,右方向移动到 空格中。游戏的最终目标是通过合法移动,将数字 1~8 按行排好序。在一般情况下,n2-1 谜问题是将数字 1~n2-1 按照任意次序排在n×n的方格阵列中,留下一个空格。允许与空格相邻的数字从上,下,左,右 4个方向移动到空格中。游戏的最终目标是通过合法移动,将初始状态变换到目标状态。 对于给定的n×n方格阵列中数字1~n2-1 初始排列,编程计算将初始排列通过合法移动变换为目标状态最少移动次数。 ′数据输入: 文件的第1行有1个正整数n。以下的n行是 n×n方格阵列的中数字1~n2-1的初始排列,每行有n个数字表示该行方格中的数字, 0表示空格。 接着n行是n×n方 格阵列的中数字1~n2-1的目标排列,每行有n个数字表示该行方格中的数字, 0表示空格。1<=n<=10 结果输出: 第 1 行是最少移动次数。
Rearrangement Jiu Gong is an ancient single puzzle. Jiu Gong is said to originate from the rearrangement of China in ancient times by the Three Kingdoms story, "Guan Yu Yi Cao release" designed to intellectual toys "Huarong" and later spread to Europe, will figure into a figure. Jiugong original rearrangement problem is this: will the number 1 to 8 in accordance with any order of ranking, the box in the 3 × 3 array, leaving a space. And the number of adjacent spaces, to allow from the top, bottom, left and right direction to move to the space. The ultimate goal of the game through the legal move, the numbers 1 to 8 lined by row sequence. Under normal circumstances, n2-1 mystery issue is the number 1 ~ n2-1 in accordance with any order of rank n × n array of squares, leaving a space. Permitted number of adjacent spaces from the top, bottom, left and right four directions to move to an empty cell. The ultimate goal of the game through the legal move, transform the initial state to target (2010-07-28, Visual C++, 863KB, 下载14次)

http://www.pudn.com/Download/item/id/1253192.html

[数学计算] 1

给定n 位正整数a,去掉其中任意k≤n 个数字后,剩下的数字按原次序排列组成一个新的正整数。对于给定的n位正整数a 和正整数k,设计一个算法找出剩下数字组成的新数最小的删数方案。对于给定的正整数a,编程计算删去k个数字后得到的最小数。
Given n-bit positive integer a, to remove any of them k ≤ n digits after the original order of the remaining figures to form a new positive integer. For a given n-bit positive integers a and positive integer k, design an algorithm to find the remaining digits of the number of the smallest deletion the number of new programs. For a given positive integer a, calculated by deleting the k-programmed to be the minimum number of figures. (2010-03-16, Visual C++, 1KB, 下载1次)

http://www.pudn.com/Download/item/id/1089424.html

[数学计算] fan

问题描述: 球赛门票的售票处规定每位购票者限购一张门票,且每张门票售价50元。购票者中有 m位手持50元钱币,另有n人手持100元。假设售票处开始售票时无零钱。问这m+n人有 几种排队方式可使售票处不致出现找不出钱的局面。 编程任务: 对给定的m,n(0<=m,n<=11),输出各种排队方式(从小到大),计算出排队方式总数。
Problem Description: The box office ticket sales are limited to the provisions of each ticket purchase a ticket, and the price of 50 yuan per ticket. Ticket-holders have m-bit hand-held 50 coins, and another n armed with 100 yuan. Suppose no small change when the ticket office began selling tickets. M+ n asking a few people queuing up outside ticket office can not find the money to avoid a situation. Programming task: For a given m, n (0 < = m, n < = 11), the output of various line approach (from small to large), calculate the total number of queuing up outside. (2010-01-04, Visual C++, 1KB, 下载2次)

http://www.pudn.com/Download/item/id/1028728.html

[数学计算] SubsetSum

子集和问题的一个实例为〈 S,t 〉。其中,S={x1 ,x2 ,…, xn }是一个正整数的集合,c是一个正整数。子集和问题判定是否存在S的一个子集S1,使得x1+x2+...+xk=S, 其中x1,x2...xk属于集合S1。 对于给定的正整数的集合S和正整数c,编程计算S 的一个子集S1,使得x1+x2+...+xk=S, 其中x1,x2...xk属于集合S1。
Subset of the problem and an example for < S, t> . Of which, S = (x1, x2, ..., xn) is a set of positive integers, c is a positive integer. And problems in a subset of S to determine whether there is a subset of S1, makes x1+ x2+...+ xk = S, one x1, x2 ... xk are set S1. For a given set of positive integers S and positive integer c, calculated S a subset of S1, makes x1+ x2+...+ xk = S, one x1, x2 ... xk are set S1. (2009-06-12, Visual C++, 328KB, 下载28次)

http://www.pudn.com/Download/item/id/804337.html

[数学计算] whitenoise

1.产生白噪声程序 编程产生一组正态分布的白噪声信号,它的均值和方差以及长度可随意调整。将产生的白噪声信号存入数据文件。 本程序算法用C++语言编写。首先用乘同余法产生均匀分布白噪声,再用变换抽样法转换为高斯分布白噪声。算法及程序实现叙述如下。 1) 设定x初值为11,A=179,长度WNlength,均值Average,方差Serror为用户输入的变量; 2) M =235,ζi= x/M; 3) 取ζi的小数部分再赋值给ζi+1,这就是均匀分布白噪声; 4) 利用公式 η1=Serror×(–2*logζ1)0.5×cos(2pζ2) +Average η2= Serror×(–2*logζ1)0.5×sin(2pζ2) +Average 计算得到均值和方差可任意调整的白噪声序列。式中 为均匀分布白噪声。
err (2008-09-12, Visual C++, 160KB, 下载166次)

http://www.pudn.com/Download/item/id/545126.html

[数学计算] One

Ex4-22 单射函数问题 « 问题描述: 设函数f将点集S = {0,1, , n -1}映射为f (S) = { f (i) | iÎ S} Í S 。单射函数问题要 从S中选取最大子集X Í S 使f (X )是单射函数。 例如,当n=7, f (S) = {1,0,0,2,2,3,6} Í S 时, X = {0,1,6} Í S 是所求的最大子集。 « 编程任务: 对于给定的点集S = {0,1, , n -1}上函数f,试用抽象数据类型队列,设计一个O(n)时 间算法,计算f的最大单射子集。 « 数据输入: 由文件input.txt 提供输入数据。文件的第1 行有1 个正整数n,表示给定的点集 S = {0,1, , n -1}。第2 行是f (i)的值,0 £ i < n。 « 结果输出: 程序运行结束时,将计算出的f的最大单射子集的大小输出到output.txt中。 输入文件示例 输出文件示例 input.txt 7 1 0 0 2 2 3 6 output.txt 3
err (2008-04-21, Visual C++, 1KB, 下载30次)

http://www.pudn.com/Download/item/id/442559.html

[数学计算] Sink

Ex8-4 汇点问题 « 问题描述: 采用邻接矩阵表示一个具有n 个顶点的图时,大多数关于图的算法时间复杂性为 O(n2 ),但也有例外。例如,即使采用邻接矩阵表示一个有向图G,确定G 是否含有一个 汇(即入度为n-1,出度为0 的顶点),只需要O(n)计算时间。试写出其算法。 « 编程任务: 对于给定的有n个顶点的图G 的邻接矩阵,各顶点依次编号为1,2,…,n。试设计一 个O(n)时间算法,计算图G 的汇点。 « 数据输入: 由文件input.txt提供输入数据。文件的第1 行有1 个正整数n,表示图G 中顶点个数。 第2 行起每行n个数,共n行,给出图G 的邻接矩阵。 « 结果输出: 程序运行结束时,将计算出的汇点编号输出到output.txt中。当图G 没有汇点时输出0。 输入文件示例 输出文件示例 input.txt 5 0 0 1 1 1 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 output.txt 3
err (2008-04-21, Visual C++, 51KB, 下载52次)

http://www.pudn.com/Download/item/id/442556.html

[数学计算] dom.cpp

Ex3-23 亲兄弟问题 « 问题描述: 给定n 个整数0 1 1 , , , n- a a  a 组成的序列。序列中元素i a 的亲兄弟元素k a 定义为: min{ | } k i j n j j i a = a a ³ a < < 。 亲兄弟问题要求给定序列中每个元素的亲兄弟元素的位置。元素i a 的亲兄弟元素为k a 时,称k 为元素i a 的亲兄弟元素的位置。当元素i a 没有亲兄弟元素时,约定其亲兄弟元素 的位置为-1。 例如,当n=10,整数序列为6,1,4,3,6,2,4,7,3,5 时,相应的亲兄弟元素位 置序列为:4,2,4,4,7,6,7,-1,9,-1。 « 编程任务: 对于给定的n个整数0 1 1 , , , n- a a  a 组成的序列,试用抽象数据类型栈,设计一个O(n) 时间算法,计算相应的亲兄弟元素位置序列。 « 数据输入: 由文件input.txt提供输入数据。文件的第1 行有1 个正整数n,表示给定给n个整数。 第2 行是0 1 1 , , , n- a a  a 。 « 结果输出: 程序运行结束时,将计算出的与给定序列相应的亲兄弟元素位置序列输出到output.txt 中。 输入文件示例 输出文件示例 input.txt 10 4 2 4 4 7 6 7 -1 9 -1 output.txt 6 1 4 3 6 2 4 7 3 5
err (2008-04-21, Visual C++, 1KB, 下载120次)

http://www.pudn.com/Download/item/id/442551.html

[数学计算] Sum

算法实现题1-2 连续和问题 « 问题描述: 给定一个正整数n,计算有多少个不同的连续自然数段,其和恰为n。例如,当n=27 时,有4 个不同的连续自然数段的和恰为27:2+3+4+5+6+7;8+9+10;13+14;27。 « 编程任务: 给定一个正整数n,试设计一个O(n)时间算法,计算有多少个不同的连续自然数段的 和恰为n。 « 数据输入: 由文件input.txt提供输入数据。文件的第1 行是正整数n。 « 结果输出: 程序运行结束时,将计算出的和恰为n的连续自然数段的个数输出到output.txt中。 输入文件示例 输出文件示例 input.txt 27 output.txt 4
Algorithm 1-2 consecutive title and the issue of ?Description of the problem: given a positive integer n, calculate the number of consecutive natural number of different paragraph, and its and exactly n. For example, when n = 27, there were four different sections for natural and exactly 27:22 B! 3+ 4+ 5+ 6+ 7 8+ 9+ 10 13+ 14 27. ?Programming tasks: Given a positive integer n, try to design a O (n) time algorithm to calculate the number of different section of consecutive natural numbers and exactly n. ?Data input: from file input.txt to provide input data. Paragraph 1 line is a positive integer n. ?The results output: program to run at the end will be calculated and exactly the consecutive natural number n the number of paragraphs in the output to output.txt. Sample input file output file example input.txt 27 output.txt 4 (2008-04-21, Visual C++, 1KB, 下载64次)

http://www.pudn.com/Download/item/id/442550.html

[数学计算] 030300726[1]

1-2 实系数复变多项式问题« 编程任务:给定阶数分别为n和m的实系数复变多项式f(x) 和g(x),以及复数z,计算f (z) / g(z)的值。« 数据输入:由文件input.txt 给出输入数据。第一行有2 个正整数g(x) 的阶数。接下来的2行,每行分别有n和m个实数数。最后一行的2 个实数分别表示复数z 的实部和虚部。« 结果输出:将计算出的f (z) / g(z)的值输出到文件output.txt。文件的第一行是计算得到的复数,保留6 位有效数字。注意输出的结果应该符合数学中手写习惯。例如,当复数z 的实部和虚部分别为2 和1 时,应该输出2+i,而不是2+1i。输入文件示例 输出文件示例input.txt output.txt2 11 2 32 23.5 0.5
1-2 polynomial coefficients complex issues laquo; Programming tasks : to set the order of n and m is the coefficient of complex polynomials f (x) and g (x), and the plural z, calculated f (z)/g (z) values. Laquo; Data input : from the document input.txt given input data. The first trip had two positive integers g (x) of the Order. The next two firms, each trip respectively n and m really count. The last line of the two real plural z respectively, said the real and imaginary parts. Laquo; Results output : to calculate the f (z)/g (z) the value of the output to a file output.txt. The document is the first line of the complex calculation, the effective retention six figures. To output the results should be in line with mathematics handwritten habits. For example, when the plural z real an (2005-05-20, Visual C++, 1KB, 下载11次)

http://www.pudn.com/Download/item/id/1116581771366612.html
总计:380