首页 \ 问答 \ 最大应用空间(存储)(Max app space (storage))

最大应用空间(存储)(Max app space (storage))

我环顾四周,注意到apk的最大大小是50MB,但我很好奇应用程序可以下载多少应用程序空间。 一个应用程序可以占用所有应用程序存储,还是需要将其他内容下载到内部存储和/或SD卡?

谢谢


I've looked around and have noticed that the max size for an apk is 50MB, but I am curious as to how much application space an app can download. Can one app take up all of the application storage or does it need to download additional content into the internal storage and/or sd card?

Thanks


原文:https://stackoverflow.com/questions/9336104
更新时间:2023-09-20 19:09

最满意答案

我想我们至少可以指出你正确的方向。 光学bloch方程是一个在科学界很好理解的问题,虽然不是我:-),因此互联网上已经存在解决这一特定问题的方法。

http://massey.dur.ac.uk/jdp/code.html

但是,为了满足您的需求,您谈到了使用complex_ode,我认为这很好,但我认为简单的scipy.integrate.ode也可以正常工作,根据他们的文档:

 from scipy import eye
 from scipy.integrate import ode

 y0, t0 = [1.0j, 2.0], 0

 def f(t, y, arg1):
     return [1j*arg1*y[0] + y[1], -arg1*y[1]**2]
 def jac(t, y, arg1):
     return [[1j*arg1, 1], [0, -arg1*2*y[1]]]
 r = ode(f, jac).set_integrator('zvode', method='bdf', with_jacobian=True)
 r.set_initial_value(y0, t0).set_f_params(2.0).set_jac_params(2.0)
 t1 = 10
 dt = 1
 while r.successful() and r.t < t1:
     r.integrate(r.t+dt)
     print r.t, r.y

您还可以获得更老,更成熟,更好记录的功能。 我很惊讶你有8个而不是9个耦合的ODE,但我相信你比我更了解这个。是的,你是对的,你的函数应该是ydot = f(t,y) ,你称之为def derv()但是你需要确保你的函数至少有两个参数,比如derv(t,y) 。 如果你的y在矩阵中,没问题! 只需在derv(t,y)函数中“重塑”它就像这样:

Y = numpy.reshape(y,(num_rows,num_cols));

只要num_rows*num_cols = 8 ,您的ODE数就应该没问题。 然后在计算中使用矩阵。 完成所有操作后,请确保返回一个向量,而不是像以下矩阵:

out = numpy.reshape(Y,(8,1));

Jacobian不是必需的,但它可能会使计算更快地进行。 如果你不知道如何计算这个,你可能想咨询维基百科或微积分教科书。 这很简单,但可能很耗时。

就初始条件而言,你应该已经知道应该是什么,无论它是复杂的还是真正有价值的。 只要您选择合理的值,它就不重要了。


I think we can at least point you in the right direction. The optical bloch equation is a problem which is well understood in the scientific community, although not by me :-), so there are already solutions on the internet to this particular problem.

http://massey.dur.ac.uk/jdp/code.html

However, to address your needs, you spoke of using complex_ode, which I suppose is fine, but I think just plain scipy.integrate.ode will work just fine as well according to their documentation:

 from scipy import eye
 from scipy.integrate import ode

 y0, t0 = [1.0j, 2.0], 0

 def f(t, y, arg1):
     return [1j*arg1*y[0] + y[1], -arg1*y[1]**2]
 def jac(t, y, arg1):
     return [[1j*arg1, 1], [0, -arg1*2*y[1]]]
 r = ode(f, jac).set_integrator('zvode', method='bdf', with_jacobian=True)
 r.set_initial_value(y0, t0).set_f_params(2.0).set_jac_params(2.0)
 t1 = 10
 dt = 1
 while r.successful() and r.t < t1:
     r.integrate(r.t+dt)
     print r.t, r.y

You also have the added benefit of an older more established and better documented function. I am surprised you have 8 and not 9 coupled ODE's, but I'm sure you understand this better than I. Yes, you are correct, your function should be of the form ydot = f(t,y), which you call def derv() but you're going to need to make sure your function takes at least two parameters like derv(t,y). If your y is in matrix, no problem! Just "reshape" it in the derv(t,y) function like so:

Y = numpy.reshape(y,(num_rows,num_cols));

As long as num_rows*num_cols = 8, your number of ODE's you should be fine. Then use the matrix in your computations. When you're all done, just be sure to return a vector and not a matrix like:

out = numpy.reshape(Y,(8,1));

The Jacobian is not required, but it will likely allow the computation to proceed much more quickly. If you do not know how to compute this you may want to consult wikipedia or a calculus text book. It's pretty simple, but can be time consuming.

As far as initial conditions, you should probably already know what those should be, whether it's complex or real valued. As long as you select values that are within reason, it shouldn't matter much.

相关问答

更多
  • 解算器确实来回走动,我想也是因为时间步长变化。 但我认为困难来自于f(t, X)的结果不仅是t和X的函数,而且是之前调用此函数的函数,这不是一个好主意。 您的代码通过替换: inputspike(t) g_syn = synapse(t, spiketrain[-1]) 通过: last_spike_date = np.max( a[a
  • A有多大和稀疏? 看起来A在这个函数中只是一个常量: def to_solver_function(time,vector): sendoff = np.dot(A, np.transpose(vector)) return sendoff vector 1d? 然后np.transpose(vector)什么都不做。 出于计算目的,您需要 Asparse = sparse.csr_matrix(A) np.dot(Asparse, vector)吗? np.dot应该是稀疏感知的。 如 ...
  • 在线 y_solutions.append(y) 你认为你正在追加当前的向量。 实际发生的是您将对象引用附加到y 。 由于积分器显然在积分循环期间重用了向量y ,因此总是附加相同的对象引用。 因此,最后,列表的每个位置由指向y的最后状态的向量的相同参考填充。 长话短说:换成 y_solutions.append(y.copy()) 一切都很好。 In the line y_solutions.append(y) you think that you are appending ...
  • 在github上发现这个问题https://github.com/scipy/scipy/issues/1976这基本上解释了它是如何工作的,当你想到这些初始值解算器是如何工作的(逐步进入最后一点的方向),它会变得更清楚为什么会这样这样做。 我的代码如上所示: import scipy as sp import pylab as pb def phase(t, y): c1 = y dydt = - c1 return dydt c1 = 1.0 t0 = 0.0 # not ...
  • 我想我们至少可以指出你正确的方向。 光学bloch方程是一个在科学界很好理解的问题,虽然不是我:-),因此互联网上已经存在解决这一特定问题的方法。 http://massey.dur.ac.uk/jdp/code.html 但是,为了满足您的需求,您谈到了使用complex_ode,我认为这很好,但我认为简单的scipy.integrate.ode也可以正常工作,根据他们的文档: from scipy import eye from scipy.integrate import ode y0, t0 ...
  • 为什么会发生这种情况,我该如何解决这个问题呢? 这是因为多年前做出的不幸的API设计决定。 odeint和ode类需要不同的签名才能解决系统问题。 你可以通过添加一个包装器来修复它,当你使用ode类时,它会改变前两个参数的顺序。 例如,你可以改变这个: r = sc.ode(f).set_integrator(solver) 至 r = sc.ode(lambda t, x, *args: f(x, t, *args)).set_integrator(solver) 更好地记录这种差异正 ...
  • 你的scipy代码解决了微分方程,初始条件为y(-3) = 0 ,而不是y(0) = 0 。 odeint的y0参数是t参数中第一次给出的值。 在y(0)= 0的区间[ odeint ]上解决此问题的一种方法是调用odeint两次,如下所示: In [81]: from scipy.integrate import odeint In [82]: def f(y,t): ....: return [t**2 + y[0]] ....: In [83]: tneg = n ...
  • 包装中似乎有些东西被破坏了。 来自问题跟踪器 : 至少在Ubuntu机器上,以下解决方法有助于: export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgfortran.so.3通过这种方式,临时替换有问题的libgfortran版本。 It seems something is broken in the package. From the issue tracker: At least on an Ubuntu machine, following workaro ...
  • 到目前为止,我对微分方程理论的理解是:除非你有一些额外的约束(比如你的例子),否则无法确定解决方案的偏差。 通常,可以说集成总是必须处理数字错误。 特别是在更高的尺寸中,并且当具有表现不佳的积分(例如,近极点)时,数值误差可以非常快地变得占主导地位。 这是许多模拟任务的关键问题,并且需要针对每类问题的专门方法(例如,请参阅scipy.integrate.ode )。 您也可以尝试一种符号方法,查看Sympy的ODE模块 。 As far my understanding on the theory of d ...
  • 这似乎是scipy.integrate中的已知错误 。 似乎在complex_ode打破了额外的参数传递。 您可以尝试看看他们是否已在较新版本中修复它(虽然此错误报告表明它们没有),或者在使用complex_ode时仅限制自己的包装函数而不需要额外的参数。 例如,针对您的示例的hacky解决方案可能是这样的: from scipy.integrate import complex_ode class myfuncs(object): def __init__(self, f, jac, fargs ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)