Tag: 对数

什么会导致algorithm有O(log log n)的复杂性?

这个较早的问题解决了一些可能导致algorithm具有O(log n)复杂度的因素。 什么会导致一个algorithm的时间复杂度O(log log n)?

在python中用matplotlib绘制对数坐标轴

我想用matplotlib绘制一个对数坐标轴的graphics。 我一直在阅读文档,但无法弄清楚语法。 我知道这可能是一些简单的东西,比如情节论证中的“scale = linear”,但是我似乎无法做到 示例程序: from pylab import * import matplotlib.pyplot as pyplot a = [ pow(10,i) for i in range(10) ] fig = pyplot.figure() ax = fig.add_subplot(2,1,1) line, = ax.plot(a, color='blue', lw=2) show()

'log'和'symlog'有什么区别?

在matplotlib中 ,我可以使用pyplot.xscale()或Axes.set_xscale()来设置轴的缩放比例。 这两个函数接受三个不同的尺度: 'linear' | 'log' | 'symlog' 。 'log'和'symlog'什么'symlog' ? 在一个简单的testing中,他们看起来完全一样。 我知道文件说他们接受不同的参数,但我仍然不明白他们之间的差异。 有人可以解释吗? 答案将是最好的,如果它有一些示例代码和graphics! (又名:'symlog'这个名字来自哪里?)